/* Header pills (Friends - Public Lobby - Rankings), Friends panel polish, Rankings panel. Loaded after site.css. */
.hpills { display: flex; align-items: center; gap: 8px; flex: none; }
.top-in .fbtn { margin-left: 0; }
.hpill { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line2); background: #ffffff0a; color: var(--text); font: 700 14px var(--body); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s; }
.hpill:hover, .hpill[aria-expanded="true"], .hpill[aria-current] { background: #ffffff18; border-color: #ffffff44; }
.hpill .i { width: 19px; height: 19px; }
.lpill-h { color: var(--cyan); border-color: #3ee6e655; background: #3ee6e60d; }
.lpill-h:hover, .lpill-h[aria-current] { background: #3ee6e61f; border-color: #3ee6e699; }
.rkbtn { color: #ffcf6b; }
.hpill-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--cyan); color: #00262a; font: 800 12px/20px var(--body); text-align: center; }
.nav a { white-space: nowrap; }
.nav-satoru { color: var(--cyan) !important; }
@media (max-width: 1100px) { .nav a { padding: 8px 9px; font-size: 14px; } }
.fbtn-on { position: relative; padding-left: 16px; }
.fbtn-on::before { content: ""; position: absolute; left: 6px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: #0e0b1f; }
.fbtn-listed { max-width: 130px; overflow: hidden; text-overflow: ellipsis; height: 20px; padding: 0 8px; border-radius: 999px; background: #3ee6e626; color: var(--cyan); font: 700 12px/20px var(--body); }
.pbar-pills { display: flex; align-items: center; gap: 6px; margin-left: 2px; }
.pbar .hpill { height: 38px; padding: 0 11px; }
@media (max-width: 1240px) { .hpill-label { display: none; } .hpill { padding: 0 12px; } .fbtn-listed { max-width: 90px; } }
@media (max-width: 1080px) { .fbtn-listed { display: none !important; } }
@media (max-width: 640px) {
  .hpills { margin-left: auto; gap: 6px; }
  .hpill, .top-in .fbtn { height: 38px; padding: 0 10px; }
  .pbar .hpill, .pbar .fbtn { height: 34px; padding: 0 8px; }
}
@media (max-width: 380px) { .logo-text { display: none; } }

/* Friends panel */
.fme-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fme-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fme-name { font: 800 20px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 210px; }
.fcode-pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #ffd23f66; background: #ffd23f14; color: var(--text); font: 600 12px var(--body); cursor: pointer; }
.fcode-pill b { font: 800 16px var(--display); letter-spacing: .12em; color: var(--sun); }
.fcode-pill .i { width: 15px; height: 15px; color: var(--sun); }
.fcode-pill:hover { background: #ffd23f2b; }
.fcode-pill.copied { border-color: var(--lime); background: #a3ff5c26; }
.fpill { display: inline-block; padding: 2px 8px; border-radius: 999px; font: 700 11px/1.5 var(--body); background: #ffffff1a; color: var(--muted); vertical-align: middle; }
.fpill-on { background: #3ee6e626; color: var(--cyan); }
.fpill-lead { background: var(--sun); color: #1a1300; margin-left: 6px; }
.fpill-lock { background: #a3ff5c22; color: var(--lime); }
.fname-form { display: flex; gap: 8px; margin-top: 10px; }
.fme .fme-top { flex-wrap: nowrap; }
.facct { position: relative; flex: none; }
.facct summary { list-style: none; gap: 6px; }
.facct summary::-webkit-details-marker { display: none; }
.facct .glogo, .fgoogle .glogo { width: 16px; height: 16px; }
.fgoogle.fb-sm { min-height: 34px; padding: 0 12px; gap: 6px; }
.fshare { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fshare .fhint { margin: 0; }
.flisted { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: #ffffff08; font-size: 13px; color: var(--muted); }
.flisted-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-all { margin-left: auto; }
.rkpanel .fhead h2 { flex: 0 1 auto; }
.fname-form input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: #ffffff0a; color: var(--text); font: 600 15px var(--body); }
.fhint { margin: 6px 0 0; font-size: 12px; color: var(--dim); }
.flisted { margin: 10px 0 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fb-link { min-height: 0; padding: 0; border: 0; background: none; color: var(--sun); text-decoration: underline; font-weight: 700; }
.fcount-on { background: #a3ff5c26 !important; color: var(--lime) !important; }
.fparty-st { margin: 8px 0; padding: 8px 10px; border-radius: 10px; background: #ffffff0d; font-size: 13px; }
.fparty-st.st-ready { background: #3ee6e61f; color: var(--cyan); }
.fparty-st.st-failed { background: #ff4d8d22; color: #ff9fbf; }
.fparty .fname { display: inline-flex; align-items: center; }

/* Rankings panel */
.rk-medals { display: flex; gap: 8px; margin-bottom: 8px; }
.rk-medal { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: #ffffff0d; font-weight: 800; }
.rk-mine, .rk-champs, .rk-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rk-mine li { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: #ffffff08; }
.rk-what { display: flex; flex-direction: column; min-width: 0; }
.rk-game { color: var(--text); font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-game:hover { color: var(--sun); }
.rk-rank { font: 800 16px var(--display); color: var(--muted); }
.rk-val { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-gold { color: #ffd23f; } .rk-silver { color: #d6dcf0; } .rk-bronze { color: #e0965a; } .rk-top10 { color: var(--cyan); }
.rk-champs li, .rk-rows li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; }
.rk-champs li:nth-child(odd), .rk-rows li:nth-child(odd) { background: #ffffff07; }
.rk-champs li.me, .rk-rows li.me { background: #ffd23f1f; outline: 1px solid #ffd23f55; }
.rk-pos { font-weight: 800; color: var(--muted); text-align: center; }
.rk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-gap { margin-top: 6px; border-top: 1px dashed var(--line2); }
.rk-search { width: 100%; height: 38px; margin: 0 0 8px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: #ffffff0a; color: var(--text); font: 500 14px var(--body); }
.rk-games { display: grid; gap: 6px; }
.rk-g { border-radius: 12px; background: #ffffff08; }
.rk-g[open] { background: #ffffff0f; padding-bottom: 10px; }
.rk-g summary { display: flex; align-items: center; gap: 10px; padding: 8px; cursor: pointer; list-style: none; min-height: 44px; }
.rk-g summary::-webkit-details-marker { display: none; }
.rk-g summary img { width: 64px; height: 36px; object-fit: cover; border-radius: 6px; flex: none; }
.rk-gt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rk-gt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-board { padding: 0 8px; margin-top: 6px; }
.rk-bl { font: 700 12px var(--body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0; }
.rk-g > .fb { margin: 8px 8px 0; }
.rkpanel { width: min(460px, calc(100vw - 24px)); }

/* Party cards: at the top, under the header pills (and under the bar above a game). */
.ldock { top: 76px; bottom: auto !important; right: 12px; }
body.play .ldock { top: 52px; }
.lcard small { display: block; margin-top: 4px; font-size: 12px; }
.lcard.lask { border-color: var(--cyan); box-shadow: 0 0 0 3px #3ee6e633, 0 8px 24px rgba(0,0,0,.45); }
/* Waiting room */
.lwait { max-width: 720px; margin: 24px auto; }
.lwait h1 { margin: 6px 0 10px; }
.lwlist { margin: 18px 0; }
.lwrow { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.05); flex-wrap: wrap; }
.lwst { margin-left: auto; }
.lpill.lwaitp { background: #ffd23f26; color: var(--sun); animation: lwpulse 1.6s ease-in-out infinite; }
@keyframes lwpulse { 50% { opacity: .55; } }
.lbtn.lsm { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.lbtn.lbig { min-height: 48px; padding: 0 22px; font-size: 16px; }
.lwact { margin-top: 8px; }
@media (max-width: 640px) { .ldock { top: 60px; left: 8px; right: 8px; max-width: none; } .lwrow .lwst { margin-left: 0; width: 100%; } }

/* Phones: panels become a full-height sheet. */
@media (max-width: 640px) {
  .fpanel { top: 8px !important; left: 8px; right: 8px; width: auto; max-height: none; bottom: 8px; display: flex; flex-direction: column; }
  .fpanel[hidden] { display: none; }
  .fbody { flex: 1; }
  .fme-name { max-width: 150px; }
}
