/* ═══ v4.12 — KINGDOM TOGETHER (community) + FAMILY & SAFETY CENTER ═══ */

/* HUD: the live gathering chip under the place pill */
.tt-chip { display: inline-flex; align-items: center; gap: 8px; margin-left: 84px; padding: 4px 6px 4px 4px; border-radius: 999px; background: #fff; border: 3px solid var(--c, #ff9a2e);
  box-shadow: 0 4px 0 rgba(31,42,92,.14), 0 10px 18px rgba(31,42,92,.18); font-family: var(--font-display); color: var(--ink); pointer-events: auto; animation: promptIn .3s; max-width: 300px; }
.tt-chip:empty { display: none; }
.tt-chip .tt-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; background: var(--c, #ff9a2e); box-shadow: inset 0 -3px 0 rgba(0,0,0,.14); animation: ttBeat 1.6s ease-in-out infinite; }
.tt-chip .tt-t { display: flex; flex-direction: column; line-height: 1.05; text-align: left; min-width: 0; }
.tt-chip .tt-t b { font-size: 15px; font-weight: 700; white-space: nowrap; }
.tt-chip .tt-t small { font-family: var(--font); font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.tt-chip .tt-go { padding: 6px 10px; border-radius: 999px; background: var(--c, #ff9a2e); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .5px; }
@keyframes ttBeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
body:not([data-scene="town"]) #hudTogether, body:not([data-scene="town"]) #btnSay, body:not([data-scene="town"]) #sayWheel { display: none !important; }
/* v4.50: the basic link shows Together + Say too (was: body.basic … display:none) */

/* Say (Kind Words) button sits above Jump */
.h-act.say { right: 4px; bottom: 112px; width: 70px; height: 70px; pointer-events: auto; background: radial-gradient(circle at 50% 30%, #ffb3d4, #ff5fa2 72%); box-shadow: 0 6px 0 #c23b7a, 0 12px 22px rgba(31,42,92,.3); }
.h-act.say .say-ic { font-size: 26px; line-height: 1; }
.h-act.say span:last-child { font-size: 12px; }

/* Kind Words wheel */
.say-wheel { position: fixed; right: 108px; bottom: calc(110px + var(--safe-b)); z-index: 40; width: min(380px, calc(100vw - 24px)); padding: 14px; border-radius: 26px; background: #fff;
  box-shadow: 0 8px 0 rgba(31,42,92,.12), 0 22px 44px rgba(31,42,92,.3); border: 4px solid #ffd3e6; animation: promptIn .25s; }
.say-wheel .sw-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 4px 10px; }
.say-wheel .sw-head b { font-family: var(--font-display); font-size: 20px; color: var(--ink); }
.say-wheel .sw-head small { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.sw-emotes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 10px; }
.sw-emotes button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 16px; background: #fff3f8; box-shadow: 0 3px 0 #ffd3e6; }
.sw-emotes button span { font-size: 26px; line-height: 1; }
.sw-emotes button small { font-size: 10px; font-weight: 800; color: var(--ink-2); }
.sw-words { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-words button { padding: 9px 12px; border-radius: 999px; background: #eef6ff; color: var(--ink); font-weight: 700; font-size: 14px; box-shadow: 0 3px 0 #cfe3ff; }
.sw-emotes button:active, .sw-words button:active { transform: translateY(2px); box-shadow: none; }
.sw-note { margin: 10px 4px 0; font-size: 12px; font-weight: 700; color: var(--ink-2); }

/* world: kids' name tags, speech bubbles, the gathering sign */
.tag.kid { background: linear-gradient(180deg, #fff, #f2f6ff); color: var(--ink); border: 2px solid #c9d6ff; font-size: 13px; padding: 3px 10px; font-weight: 800; }
.bubble.mine { background: linear-gradient(180deg, #fff, #fff3f8); border: 3px solid #ff9ec7; font-size: 17px; }
.tag.place.together { animation: ttFloat 2.6s ease-in-out infinite; }
.tag.place.together .t-ic { font-size: 24px; }
@keyframes ttFloat { 0%, 100% { margin-top: 0; } 50% { margin-top: -6px; } }

/* ── P.together ── */
.panel.together { width: min(900px, calc(100vw - 24px)); background: linear-gradient(180deg, #fff7fb, #fff7e8 60%); }
.tt-tabs button { font-size: 15px; }
.tt-live { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 18px 20px; border-radius: 26px; background: #fff; border: 4px solid var(--c);
  box-shadow: 0 6px 0 rgba(31,42,92,.08), 0 16px 30px rgba(31,42,92,.12); }
.tt-live-ic { width: 92px; height: 92px; border-radius: 28px; display: grid; place-items: center; font-size: 52px; background: var(--c); box-shadow: inset 0 -6px 0 rgba(0,0,0,.12); animation: ttBeat 1.8s ease-in-out infinite; }
.tt-live h3 { font-family: var(--font-display); font-size: 30px; margin: 4px 0 2px; color: var(--ink); }
.tt-live p { margin: 2px 0; color: var(--ink-2); font-weight: 600; }
.tt-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #ff4f6d; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.tt-left b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tt-h { font-family: var(--font-display); font-size: 20px; margin: 20px 0 10px; color: var(--ink); }
.tt-next { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tt-ev { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 20px; background: #fff; border-top: 6px solid var(--c); box-shadow: 0 4px 0 rgba(31,42,92,.08); }
.tt-ev-ic { font-size: 28px; }
.tt-ev b { font-family: var(--font-display); font-size: 17px; color: var(--ink); }
.tt-ev small { color: var(--ink-2); font-weight: 700; }
.tt-time { margin-top: 6px; align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: #f2f4fb; font-weight: 800; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tt-note { margin: 16px 2px 0; font-weight: 700; color: var(--ink-2); font-size: 14px; }
.tt-note.muted { font-weight: 600; font-size: 12px; opacity: .8; }

.tt-goal { padding: 20px; border-radius: 26px; background: linear-gradient(135deg, #2e3f8f, #5a30c9); color: #fff; box-shadow: 0 8px 0 #1b2660; }
.tt-goal-top { display: flex; align-items: center; gap: 14px; }
.tt-trophy { font-size: 56px; filter: drop-shadow(0 4px 0 rgba(0,0,0,.2)); }
.tt-goal small { font-size: 11px; font-weight: 800; letter-spacing: 1.2px; opacity: .8; }
.tt-goal h3 { font-family: var(--font-display); font-size: 28px; margin: 2px 0 0; }
.tt-bar { position: relative; height: 34px; margin: 16px 0 12px; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; }
.tt-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, #ffd65c, #ff9a2e); box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); }
.tt-bar span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 15px; text-shadow: 0 1px 0 rgba(0,0,0,.35); font-variant-numeric: tabular-nums; }
.tt-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tt-steps span { padding: 8px 6px; border-radius: 14px; background: rgba(255,255,255,.12); font-size: 12px; font-weight: 800; text-align: center; opacity: .7; }
.tt-steps span.on { background: #fff; color: var(--ink); opacity: 1; }
.tt-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.tt-stats div { padding: 14px 8px; border-radius: 20px; background: #fff; text-align: center; box-shadow: 0 4px 0 rgba(31,42,92,.08); }
.tt-stats b { display: block; font-family: var(--font-display); font-size: 34px; color: var(--ink); line-height: 1; }
.tt-stats span { font-size: 12px; font-weight: 800; color: var(--ink-2); }

.tt-wall-pick { padding: 14px; border-radius: 22px; background: #fff; box-shadow: 0 4px 0 rgba(31,42,92,.08); }
.tt-wall-pick > b { font-family: var(--font-display); font-size: 18px; color: var(--ink); }
.tt-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tt-picks button { padding: 8px 12px; border-radius: 999px; background: #fff7e0; font-weight: 700; font-size: 13px; color: var(--ink); box-shadow: 0 3px 0 #ffe2a3; }
.tt-picks button.on { background: #3fbf7f; color: #fff; box-shadow: 0 3px 0 #2a8f5c; }
.tt-picks button[disabled]:not(.on) { opacity: .45; }
.tt-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 16px; padding: 18px; border-radius: 24px;
  background: #c98f5a repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 40px); box-shadow: inset 0 0 0 8px #9a6238, inset 0 0 30px rgba(0,0,0,.18); }
.tt-card { position: relative; padding: 18px 14px 10px; border-radius: 6px; background: #fffbea; transform: rotate(var(--r, 0deg)); box-shadow: 0 6px 12px rgba(60,30,0,.25); }
.tt-card.me { background: #ffe9f3; }
.tt-pin { position: absolute; top: -6px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff9a8a, #f2463a); box-shadow: 0 2px 2px rgba(0,0,0,.3); }
.tt-card-ic { font-size: 30px; }
.tt-card p { margin: 6px 0 10px; font-family: var(--font-display); font-size: 17px; line-height: 1.2; color: var(--ink); }
.tt-card-f { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tt-card-f small { font-weight: 800; color: var(--ink-2); }
.tt-pray { padding: 4px 10px; border-radius: 999px; background: #eef6ff; font-weight: 800; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tt-pray.on { background: #ffc93c; }

.tt-safe { display: flex; gap: 16px; padding: 18px; border-radius: 24px; background: #fff; box-shadow: 0 4px 0 rgba(31,42,92,.08); margin-bottom: 14px; }
.tt-safe-ic { font-size: 54px; }
.tt-safe h3 { font-family: var(--font-display); font-size: 24px; margin: 0 0 6px; color: var(--ink); }
.tt-safe ul { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; font-weight: 600; color: var(--ink-2); }
.say.center, .row.center { text-align: center; justify-content: center; }

/* ── FAMILY & SAFETY CENTER ── */
.panel.family { width: min(980px, calc(100vw - 24px)); }
.fc { display: grid; gap: 14px; margin: 10px 0 16px; }
.fc-kid { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(135deg, #2e3f8f, #3b8cff); color: #fff; }
.fc-kid small { font-size: 11px; font-weight: 800; letter-spacing: 1.2px; opacity: .8; }
.fc-kid h3 { margin: 2px 0 0; font-size: 22px; }
.fc-pill { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.18); font-weight: 800; white-space: nowrap; }
.fc-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; }
.fc-card { background: #fff; border-radius: 16px; padding: 16px; border: 1px solid #e6e8f0; }
.fc-card h4 { margin: 0 0 12px; font-size: 16px; display: flex; justify-content: space-between; gap: 8px; }
.fc-card h4 b { color: #2468e0; font-variant-numeric: tabular-nums; }
.fc-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 150px; align-items: end; }
.fc-bars > div { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.fc-bars i { position: relative; width: 100%; max-width: 34px; min-height: 4px; border-radius: 8px 8px 4px 4px; background: #cfe0ff; }
.fc-bars .today i { background: #3b8cff; }
.fc-bars em { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 11px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fc-bars span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.fc-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fc-nums div { padding: 10px 6px; border-radius: 12px; background: #f6f7fb; text-align: center; }
.fc-nums b { display: block; font-size: 26px; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.fc-nums span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.fc-q { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid #eef0f6; }
.fc-q:first-of-type { border-top: 0; padding-top: 0; }
.fc-q > span { font-size: 24px; }
.fc-q b { display: block; }
.fc-q p { margin: 2px 0 0; color: var(--ink-2); }
.fc-ctl { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; }
.fc-ctl label { margin: 0; display: flex; align-items: center; gap: 8px; }
.fc-togs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.parent .fc-tog { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px; border-radius: 12px; background: #f6f7fb; cursor: pointer; font-weight: 600; }
.fc-tog input { position: absolute; opacity: 0; pointer-events: none; }
.fc-sw { flex: none; width: 44px; height: 26px; border-radius: 999px; background: #cfd4e6; position: relative; transition: background .2s; }
.fc-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.fc-tog input:checked + .fc-sw { background: #3fbf7f; }
.fc-tog input:checked + .fc-sw::after { transform: translateX(18px); }
.fc-tog input:focus-visible + .fc-sw { outline: 3px solid #3b8cff; outline-offset: 2px; }
.fc-tog small { display: block; font-weight: 500; color: var(--ink-2); font-size: 13px; }
.fc-prom { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fc-prom div { padding: 12px; border-radius: 12px; background: #f0fbf5; border: 1px solid #cdeedc; }
.fc-prom span { font-size: 22px; }
.fc-prom b { display: block; margin: 4px 0 2px; }
.fc-prom small { color: var(--ink-2); font-size: 13px; line-height: 1.35; display: block; }
.fc-more summary { cursor: pointer; font-weight: 800; }
.fc-more table { margin-top: 10px; }

@media (max-width: 760px) {
  .tt-live { grid-template-columns: auto 1fr; }
  .tt-live .btn { grid-column: 1 / -1; }
  .tt-live-ic { width: 64px; height: 64px; font-size: 36px; border-radius: 20px; }
  .tt-live h3 { font-size: 24px; }
  .tt-next, .tt-steps { grid-template-columns: repeat(2, 1fr); }
  .tt-stats { grid-template-columns: repeat(3, 1fr); }
  .fc-grid, .fc-togs { grid-template-columns: 1fr; }
  .fc-nums { grid-template-columns: repeat(2, 1fr); }
  .fc-prom { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px), (max-height: 620px) {
  .tt-chip { margin-left: 56px; max-width: 230px; }
  .tt-chip .tt-ic { width: 28px; height: 28px; font-size: 16px; }
  .tt-chip .tt-t b { font-size: 13px; }
  .say-wheel { right: 12px; bottom: calc(150px + var(--safe-b)); }
}
@media (max-width: 640px) { .tt-chip { margin-left: 44px; } .tt-chip .tt-go { display: none; } }
@media (max-height: 460px) {
  .tt-chip .tt-t small { display: none; }
  .say-wheel { right: 96px; bottom: 8px; width: min(420px, calc(100vw - 200px)); padding: 10px; max-height: calc(100vh - 16px); overflow: auto; }
  .say-wheel .sw-head { margin-bottom: 6px; } .say-wheel .sw-head small, .sw-note { display: none; }
  .sw-emotes { gap: 4px; margin-bottom: 6px; } .sw-emotes button { padding: 4px 0 3px; } .sw-emotes button span { font-size: 20px; }
  .sw-words { gap: 4px; } .sw-words button { padding: 6px 10px; font-size: 12px; }
}

/* v4.18 grown-ups: consent, recovery code, account */
.pg-consent { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 4px; font-size: 14px; line-height: 1.45; cursor: pointer; text-align: left; }
.pg-consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: #f2b705; }
.pg-code { display: block; font: 800 clamp(20px, 6vw, 28px)/1.2 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: 3px; color: #1f2a5c; background: #fff7d6; border: 2px dashed #f2b705; border-radius: 14px; padding: 12px; user-select: all; overflow-wrap: anywhere; }
.pg-account { margin-top: 16px; padding: 14px 16px; border-radius: 18px; background: rgba(31,42,92,.05); border: 1px solid rgba(31,42,92,.12); }
.pg-account h3 { margin: 0 0 4px; }
.pg-account .row { flex-wrap: wrap; gap: 8px; }
.btn.warn { color: #c0392b; border-color: rgba(192,57,43,.35); }
