/* BrightWins friends: the kid board and profile (fr-*, fv-*) and the parent Friends card, sheets and verification sheet (fm-*, vf-*).
   Loaded after kid.css. Motion is limited to the no-preference block at the end. */

/* ---------- Kid: friends board ---------- */
.fr-board { display: flex; flex-direction: column; gap: 1.1rem; }
.fr-code { text-align: center; padding: 1rem 1rem 1.1rem; border-radius: 18px; background: linear-gradient(120deg, #2b2f4e, #3c2f66); border: 2px solid #7f6bff; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35); }
.fr-code-label { font-size: 0.78rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: #c6cff0; }
.fr-code-val { margin: 0.5rem auto 0.2rem; display: block; max-width: 100%; padding: 0.45rem 0.9rem; border-radius: 14px; background: var(--bg-deep); box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.45);
  font-size: clamp(1.5rem, 8.6vw, 2.8rem); font-weight: 900; letter-spacing: 0.06em; white-space: nowrap; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.fr-code-note { margin: 0.5rem 0 0; color: #e4e5ef; font-weight: 800; }
.fr-copy { margin-top: 0.7rem; min-width: 150px; }

.btn.kid-add { width: 100%; min-height: 68px; font-size: 1.55rem; font-weight: 900; border-radius: 16px; gap: 0.6rem; background: linear-gradient(#10d58a, #00b06f); color: #04180f; box-shadow: 0 6px 0 var(--green-edge); }
.btn.kid-add::before { content: "+"; font-size: 2.2rem; line-height: 1; font-weight: 900; margin-top: -0.2rem; }
.btn.kid-add:hover:not(:disabled) { background: linear-gradient(#13e093, #00bb77); filter: none; }
.btn.kid-add:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--green-edge); }

.fr-sec-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.fr-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.45rem; border-radius: 999px; background: #4a4d50; font-size: 0.85rem; font-weight: 900; }

.fr-req { padding: 0.85rem; margin-bottom: 0.6rem; border-radius: 18px; background: linear-gradient(180deg, #243a32, var(--card-2) 75%); border: 2px solid #2c7a5a; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35); }
.fr-req-top { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.8rem; }
.fr-req-top .avatar-svg { flex: none; border-radius: 16px; }
.fr-req-name { font-size: 1.25rem; font-weight: 900; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.fr-req-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.fr-req-actions .btn { min-height: 58px; font-size: 1.15rem; padding: 0.4rem 0.5rem; }

.fr-wait-list { display: flex; flex-direction: column; gap: 0.5rem; }
.fr-wait { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.75rem; background: var(--card-2); border: 1px solid var(--line-soft); border-radius: 14px; min-height: 64px; }
.fr-wait .avatar-svg { flex: none; border-radius: 14px; }
.fr-wait-text { flex: 1; min-width: 0; }
.fr-wait-name { font-weight: 900; font-size: 1.05rem; overflow-wrap: anywhere; }
.fr-wait-sub { color: #ffd978; font-weight: 800; font-size: 0.9rem; }

.fr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.6rem; }
.fr-tile { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; min-height: 44px; min-width: 0; padding: 0.8rem 0.4rem 0.7rem; text-align: center; color: #fff; text-decoration: none;
  background: var(--card-2); border: 2px solid var(--line); border-radius: 16px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.fr-tile:active { transform: translateY(2px) scale(0.97); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }
.fr-tile:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.fr-tile .avatar-head { border-radius: 18px; margin-bottom: 0.2rem; }
.fr-tile-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; }
.fr-tag { display: inline-block; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.15rem 0.55rem; border-radius: 6px; background: #3c2f66; color: #d9ccff; box-shadow: inset 0 -3px 0 #7f6bff; }
.fr-hint { margin: 0.7rem 0 0; color: var(--muted); font-weight: 700; }
.fr-empty { padding: 1.1rem 1rem; text-align: center; background: var(--card-2); border: 2px dashed var(--line); border-radius: 18px; }
.fr-empty-title { font-size: 1.3rem; font-weight: 900; margin-bottom: 0.3rem; }
.fr-empty p { margin: 0.4rem 0; color: #dfe0e1; font-weight: 700; }

/* "Add a friend" sheet */
.fr-code-input { text-transform: uppercase; letter-spacing: 0.12em; font-size: 1.4rem; text-align: center; min-height: 60px; }
.fr-code-input::placeholder { letter-spacing: 0.12em; color: #7d8084; text-transform: uppercase; }
.fr-sent { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; text-align: center; padding: 0.4rem 0 0; }
.fr-sent .avatar-svg { border-radius: 20px; }
.fr-sent-title { font-size: 1.6rem; font-weight: 900; color: #2fe69a; }
.fr-sent-text { margin: 0; font-size: 1.1rem; font-weight: 800; }

/* ---------- Kid: friend profile ---------- */
.fv { display: flex; flex-direction: column; gap: 0.9rem; }
.fv-stage.lobby-stage { display: block; min-height: 300px; }
.fv-scene { position: relative; min-height: 300px; }
.fv-stage .stage-figure { bottom: 38px; }
.fv-id { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.2rem; }
.fv-name { margin: 0; max-width: 100%; overflow-wrap: anywhere; }
.fv-since { margin: 0; color: #c6cff0; font-weight: 800; }
.fv-block { margin-top: 0.4rem; }
.fv-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.fv-title { margin: 0 0 0.5rem; font-size: 1.3rem; font-weight: 900; }
.fv-head .fv-title { margin-bottom: 0; }
.fv-total { display: inline-flex; align-items: baseline; gap: 0.4rem; padding: 0.25rem 0.8rem; border-radius: 999px; background: var(--bg-deep); box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.4); }
.fv-total-num { font-size: 1.6rem; font-weight: 900; color: #ffd978; font-variant-numeric: tabular-nums; }
.fv-total-unit { font-weight: 800; color: var(--muted); }
.fv-tiles { margin: 0.6rem 0 0; }
.fv-tile { cursor: default; }
.fv-recent { display: flex; flex-direction: column; gap: 0.5rem; }
.fv-row { --cat: #8e9195; display: flex; flex-direction: column; gap: 0.25rem; padding: 0.6rem 0.8rem; background: var(--card-2); border: 1px solid var(--line-soft); border-left: 6px solid var(--cat); border-radius: 14px; }
.fv-row-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.fv-date { color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.fv-reason { font-size: 1.05rem; font-weight: 900; line-height: 1.25; overflow-wrap: anywhere; }
.fv-foot { display: flex; justify-content: center; margin-top: 0.8rem; }
.btn.fv-unfriend { min-height: 48px; color: var(--red-text); text-decoration-color: var(--red-text); }
@media (min-width: 720px) {
  .fv-stage.lobby-stage, .fv-scene { min-height: 340px; }
  .fv-stage .stage-figure .avatar-full { height: 250px; width: auto; }
}

/* ---------- Parent: Family page Friends card ---------- */
.fm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.4rem; }
.fm-head h2 { margin: 0; }
.fm-head .muted { font-size: 0.85rem; }
.fm-kids { display: grid; gap: 0.7rem; }
.fm-kid { padding: 0.6rem; background: var(--card-2); border: 2px solid var(--line); border-radius: var(--radius); }
.fm-kid-main { appearance: none; font: inherit; color: #fff; text-align: left; cursor: pointer; width: 100%; min-height: 60px; display: flex; align-items: center; gap: 0.75rem; padding: 0; background: transparent; border: 0; touch-action: manipulation; }
.fm-kid-main:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 8px; }
.fm-kid-main .avatar-svg { flex: none; border-radius: 14px; }
.fm-kid-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.fm-kid-name { font-weight: 900; font-size: 1.1rem; overflow-wrap: anywhere; }
.fm-faces { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.fm-faces .avatar-svg { border-radius: 9px; flex: none; }
.fm-more-count { font-weight: 900; color: var(--muted); font-size: 0.9rem; padding-left: 0.1rem; }
.fm-none { color: var(--muted); font-weight: 700; font-size: 0.9rem; }
.fm-manage { flex: none; color: var(--link); font-weight: 900; text-decoration: underline; text-underline-offset: 4px; }
.fm-need { appearance: none; font: inherit; cursor: pointer; width: 100%; min-height: 48px; margin-top: 0.5rem; padding: 0.4rem 0.8rem; border-radius: var(--radius-sm); background: #5a4308; color: #ffd978; border: 2px solid #8a6a1a; font-weight: 900; touch-action: manipulation; }
.fm-need:hover { filter: brightness(1.1); }
.fm-need:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.fm-code { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.7rem; margin-top: 0.55rem; padding-top: 0.55rem; border-top: 1px solid var(--line-soft); }
.fm-code-label { flex: 0 0 100%; color: var(--muted); font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.fm-code-val { flex: 1; min-width: 0; font-weight: 900; font-size: 1.05rem; letter-spacing: 0.06em; white-space: nowrap; user-select: all; -webkit-user-select: all; }

/* ---------- Parent: kid sheet ---------- */
.fm-sec { margin-top: 1.1rem; }
.fm-sec-title { margin: 0 0 0.4rem; font-size: 0.8rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.fm-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.65rem; margin: 0.4rem 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.fm-row .avatar-svg { flex: none; border-radius: 12px; }
.fm-row-text { flex: 1; min-width: 0; }
.fm-row-title { font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.fm-row-sub { color: var(--muted); font-size: 0.85rem; font-weight: 700; overflow-wrap: anywhere; }
.fm-friends { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.5rem; }
.fm-friend { appearance: none; font: inherit; color: #fff; cursor: pointer; touch-action: manipulation; min-width: 0; min-height: 44px; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.6rem 0.3rem 0.5rem; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); text-align: center; }
.fm-friend:active { transform: scale(0.97); }
.fm-friend:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.fm-friend .avatar-svg { border-radius: 14px; }
.fm-friend-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: 0.95rem; }
.fm-friend-fam { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.fm-hist { display: grid; gap: 0.3rem; }
.fm-hist-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line-soft); }
.fm-hist-text { min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.fm-hist-date { flex: none; color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.fm-more { margin-top: 0.6rem; width: 100%; }
.fm-sees .vf-who { margin-bottom: 0.6rem; }
.fm-sees .fv-title, .fm-kid-sheet .fv-title { font-size: 1.1rem; }

/* ---------- Parent: verification sheet ---------- */
.vf-who { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; margin: 0.4rem 0 0.2rem; text-align: center; }
.vf-who .avatar-svg { border-radius: 20px; }
.vf-name { font-size: 1.5rem; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.vf-line { margin: 0.2rem 0 0.6rem; text-align: center; font-weight: 800; font-size: 1.05rem; }
.vf-family { padding: 0.7rem 0.9rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.vf-family-label { color: var(--muted); font-size: 0.8rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; overflow-wrap: anywhere; }
.vf-family-name { font-size: 1.25rem; font-weight: 900; margin-top: 0.1rem; overflow-wrap: anywhere; }
.vf-parents { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.2rem; }
.vf-parents li { font-weight: 800; padding-left: 1.1rem; position: relative; overflow-wrap: anywhere; }
.vf-parents li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.5rem; height: 0.5rem; border-radius: 2px; background: var(--green); }
.vf-hint { margin: 0.8rem 0 0; padding: 0.6rem 0.8rem; background: #3a3220; border: 2px solid #8a6a1a; border-radius: var(--radius-sm); color: #ffe08a; font-weight: 800; }

/* Alerts row that opens a sheet, and the dashboard friend block */
.alert-row-btn { appearance: none; font: inherit; width: 100%; text-align: left; cursor: pointer; color: inherit; }
.alert-row-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.friend-req-title { margin: 1rem 0 0.2rem; font-size: 1.05rem; }
.friend-req .btn { margin-top: 0.7rem; }
