/* Home, amici, inviti e stanze online — stessi token di style.css */

/* ---------- home: due pannelli affiancati su schermi larghi, uno sotto l'altro su telefono ---------- */
#home { align-items: flex-start; }
.home-wrap { width: min(100%, 420px); margin: auto; display: flex; flex-direction: column; gap: 14px; }
.home-wrap > .card { width: 100%; margin: 0; }
.home-card { gap: 14px; }
.home-card .tag { margin-bottom: 0; }
.side-card { gap: 14px; padding: 18px 16px 16px; }
@media (min-width: 880px) {
  #home { align-items: center; }
  .home-wrap { width: min(100%, 860px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 18px; }
  .home-card { padding: 34px 30px 24px; justify-content: center; }
  .home-card h1 { font-size: 64px; }
  .side-card { max-height: min(680px, calc(100vh - 40px - var(--sat) - var(--sab))); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}
@media (max-width: 879px) {
  .home-card h1 { font-size: clamp(44px, 13vw, 58px); }
}

.modes { display: flex; flex-direction: column; gap: 10px; }
.mode { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 12px 16px 12px 12px; border-radius: 20px; text-align: left; background: rgba(150, 190, 255, 0.1); border: 1.5px solid var(--line); transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease; }
.mode:hover { background: rgba(150, 190, 255, 0.16); border-color: rgba(160, 200, 255, 0.32); }
.mode:active { transform: translateY(2px) scale(0.99); }
.mode-ico { flex: none; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: rgba(220, 200, 255, 0.16); }
.mode-ico svg { width: 28px; height: 28px; fill: none; stroke: var(--lilac); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mode-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mode-t b { font: 800 20px/1.1 var(--display); letter-spacing: -0.01em; }
.mode-t small { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.mode > i { font-style: normal; font: 700 26px/1 var(--body); color: var(--muted); }
.mode.hot { background: #f3ecff; border-color: transparent; color: #1a1840; box-shadow: 0 5px 0 #a996dd; }
.mode.hot:hover { background: #fbf8ff; }
.mode.hot:active { box-shadow: 0 2px 0 #a996dd; }
.mode.hot .mode-ico { background: #1a1840; }
.mode.hot .mode-t small, .mode.hot > i { color: #5a5490; }
.home-foot { justify-content: space-between; margin-top: 0; }

/* profilo in cima al pannello di destra */
.side-card .acct { margin: 0; padding: 0; border: 0; min-height: 0; }
.acct-chip { grid-template-columns: 44px 1fr auto !important; grid-template-rows: auto auto; padding: 10px 12px 10px 10px !important; }
.acct-chip .lv { width: 44px !important; height: 44px !important; font-size: 20px !important; }
.acct-chip small { grid-column: 2; }
.acct-go { grid-row: 1 / 3; grid-column: 3; font-size: 13px; font-weight: 700; color: var(--lilac); padding: 7px 11px; border-radius: 10px; background: rgba(220, 200, 255, 0.14); }

/* ---------- pannello amici (home e finestra) ---------- */
.fr-panel { display: flex; flex-direction: column; gap: 14px; }
.fr-user { display: flex; flex-direction: column; gap: 16px; }
.fr-user > section { display: flex; flex-direction: column; gap: 8px; }
.fr-panel h3 { margin: 0; font: 800 17px var(--display); display: flex; align-items: baseline; gap: 8px; }
.fr-panel h3 small { margin-left: auto; font: 600 12.5px var(--body); color: var(--muted); }
.fr-inbox h3 .fr-badge { font-size: 12px; }
.fr-pitch { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.fr-pitch b { color: var(--ink); }
.fr-cta { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; margin-top: 4px; }
.fr-guest { display: flex; flex-direction: column; gap: 6px; }
.fr-search .acc-at { height: 48px; }
.fr-search input::placeholder { color: #6f86ab; font-weight: 500; }
.fr-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.fr-foot .fr-me { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: auto; }
.fr-foot .link { font-size: 13.5px; padding: 6px 0; }
.fr-empty { list-style: none; font-size: 14px; color: var(--muted); padding: 12px; border-radius: 14px; border: 1px dashed var(--line); text-align: center; }

.fr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fr-list li:not(.fr-empty) { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 7px 7px 7px 9px; border-radius: 15px; background: rgba(150, 190, 255, 0.08); }
.fr-list li.req, .fr-list li.inv { background: rgba(69, 217, 135, 0.1); border: 1px solid rgba(69, 217, 135, 0.35); }
.fr-list li.wait { opacity: 0.8; }
.fr-list .btn { height: 38px; padding: 0 13px; font-size: 14px; border-radius: 11px; flex: none; }
.fr-list .btn.go { box-shadow: 0 3px 0 #1f8f55; }
.fr-ava { position: relative; flex: none; width: 38px; height: 38px; border-radius: 12px; background: hsl(var(--h, 220) 45% 38%); display: grid; place-items: center; font: 800 17px var(--display); color: #fff; }
.fr-ava i { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: #5b6f8f; border: 2px solid #12264a; display: none; }
.fr-friends .fr-ava i { display: block; }
.fr-list li.on .fr-ava i { background: var(--go); box-shadow: 0 0 8px var(--go); }
.fr-nm { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 700; font-size: 15.5px; line-height: 1.2; }
.fr-nm, .fr-nm small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-nm small { font-weight: 600; font-size: 12.5px; color: var(--muted); }
.fr-list li.on .fr-nm small { color: #8fe8b6; }
.fr-tag { flex: none; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 6px 10px; border-radius: 10px; background: rgba(150, 190, 255, 0.1); }
.fr-tag.ok { color: var(--go); background: rgba(69, 217, 135, 0.12); }
.fr-x { flex: none; min-width: 36px; height: 36px; padding: 0 9px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: 13px; }
.fr-x:hover { background: rgba(255, 93, 108, 0.14); color: #ffc4c9; }
.fr-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--blood); color: #fff; font: 800 12px/22px var(--display); text-align: center; }
.fr-box .fr-host { display: contents; }
@media (max-width: 380px) {
  .fr-list .btn { padding: 0 10px; }
  .fr-list li:not(.fr-empty) { gap: 8px; }
}

/* ---------- inviti in arrivo: schede in alto, sopra tutto ---------- */
.fr-notes { position: fixed; z-index: 50; top: calc(10px + var(--sat, 0px)); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 12px; pointer-events: none; }
.fr-note { pointer-events: auto; width: min(100%, 420px); display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 18px; background: #f3ecff; color: #1a1840; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); animation: fr-in 0.35s cubic-bezier(.2, 1.4, .4, 1) both; transition: opacity 0.3s ease, transform 0.3s ease; }
.fr-note.out { opacity: 0; transform: translateY(-16px); }
.fr-note .fr-txt { flex: 1; min-width: 0; font-size: 15px; line-height: 1.25; }
.fr-note .fr-txt small { display: block; font-size: 12.5px; font-weight: 600; color: #5a5490; }
.fr-note .btn { height: 40px; padding: 0 14px; font-size: 15px; flex: none; box-shadow: 0 3px 0 #1f8f55; }
.fr-note .fr-x { color: #5a5490; }
@keyframes fr-in { from { transform: translateY(-24px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* pulsante «Amici» con contatore (schermata Online) */
.fr-btn { position: relative; justify-content: flex-start; gap: 10px; }
.fr-btn .fr-on { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.fr-btn .fr-on.live { color: var(--go); }

/* ---------- schermata online: stanze aperte ---------- */
#online { align-items: center; justify-content: center; padding: calc(16px + var(--sat)) max(16px, var(--sar)) calc(16px + var(--sab)) max(16px, var(--sal)); overflow-y: auto; pointer-events: auto; }
#online .card { width: min(100%, 440px); }
.on-top { display: flex; align-items: center; gap: 14px; }
.on-top h2 { margin: 0; flex: 1; font: 800 30px/1 var(--display); letter-spacing: -0.02em; }
.on-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; }
.on-head h3 { margin: 0; font: 800 17px var(--display); }
.on-head small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rooms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 42vh; overflow-y: auto; }
.rooms li { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 14px; background: rgba(150, 190, 255, 0.08); }
.rooms li.empty { justify-content: center; color: var(--muted); font-size: 14px; border: 1px dashed var(--line); background: none; padding: 14px; text-align: center; }
.rooms .rm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rooms .rm b { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rooms .rm small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rooms .cnt { font: 800 15px var(--display); color: var(--lilac); white-space: nowrap; }
.rooms .btn { height: 40px; padding: 0 14px; font-size: 15px; flex: none; }
.vis-pick { display: flex; flex-direction: column; gap: 6px; }
.vis-pick .seg { display: flex; }
.vis-pick .seg button { flex: 1; }
.share.three { grid-template-columns: 1fr 1fr; }
.share.three .wide { grid-column: 1 / -1; }
.plist .addf { font-size: 12px; font-weight: 700; color: var(--go); padding: 6px 8px; border-radius: 9px; background: rgba(69, 217, 135, 0.12); white-space: nowrap; }
