/* ============================================================
   Phony — nickname gate (blocking modal until a nickname is set)
   ============================================================ */
.nick-gate {
    position: fixed; inset: 0; z-index: 99998;
    display: none; align-items: center; justify-content: center;
    padding: 20px;
    background: rgba(8, 8, 14, 0.82);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}
.nick-gate.open { display: flex; }
.nick-card {
    width: 100%; max-width: 440px;
    background: rgba(20, 20, 28, 0.98);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 22px; padding: 0 28px 26px;
    color: #e8e8ef; overflow: hidden;
    box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8);
    animation: nick-pop 0.4s cubic-bezier(0.22,1,0.36,1);
    max-height: 94vh; overflow-y: auto;
}
@keyframes nick-pop { from{opacity:0;transform:translateY(20px) scale(0.96)} to{opacity:1;transform:none} }
.nick-head {
    margin: 0 -28px 18px; padding: 24px 28px 26px;
    background: linear-gradient(135deg, #4a9eff, #7c5cff);
    position: relative; overflow: hidden;
}
.nick-head::before { content:''; position:absolute; top:-50px; right:-30px; width:170px; height:170px; border-radius:50%; background:rgba(255,255,255,0.12); }
.nick-head-t { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; color:#fff; font-size:15px; font-weight:800; letter-spacing:0.3px; }
.nick-head-t img { width: 22px; height: 22px; }
.nick-title { font-size: 21px; font-weight: 800; letter-spacing: -0.3px; margin: 0 0 6px; color: #fff; }
.nick-sub { font-size: 14px; line-height: 1.55; color: #c8c8d4; margin: 0 0 18px; }
.nick-field label { display:block; font-size:13px; color:#a1a1a6; margin-bottom:7px; }
.nick-field input {
    width: 100%; padding: 14px 15px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px; color: #fff; font-family: inherit; font-size: 15px;
}
.nick-field input:focus { outline: none; border-color: #4a9eff; }
.nick-msg { min-height: 18px; font-size: 13px; margin: 8px 0 0; }
.nick-msg.err { color: #ff5a5a; }
.nick-msg.ok { color: #2ecc71; }
.nick-save {
    width: 100%; margin-top: 16px; padding: 14px;
    background: linear-gradient(135deg, #4a9eff, #7c5cff); color: #fff;
    border: none; border-radius: 12px; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
    transition: filter 0.15s, transform 0.15s;
}
.nick-save:hover { filter: brightness(1.1); transform: translateY(-1px); }
.nick-save[disabled] { opacity: 0.6; cursor: default; }

/* FAQ */
.nick-faq { margin-top: 20px; border-top: 1px solid rgba(255,255,255,0.10); padding-top: 6px; }
.nick-faq details { padding: 4px 0; }
.nick-faq summary { cursor: pointer; list-style: none; padding: 12px 0; font-size: 14px; font-weight: 600;
    display: flex; align-items: center; justify-content: space-between; color: #e8e8ef; }
.nick-faq summary::-webkit-details-marker { display: none; }
.nick-faq summary::after { content: '+'; font-size: 20px; color: #6e6e73; font-weight: 400; }
.nick-faq details[open] summary::after { content: '\2212'; }
.nick-faq details p { padding: 0 0 14px; font-size: 13.5px; line-height: 1.6; color: #a1a1a6; }

/* nickname chip in dashboard corner */
.nick-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 12px; border-radius: 999px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    font-size: 13px; font-weight: 600; color: #f5f5f7; white-space: nowrap;
}
.nick-chip svg { width: 14px; height: 14px; opacity: 0.8; }

/* floating variant — pinned bottom-left, never affects header layout */
.nick-chip-float {
    position: fixed;
    left: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 60;
    background: rgba(20,20,28,0.9);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
@media (max-width: 640px) {
    .nick-chip-float { left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); font-size: 12px; }
}

@media (max-width: 480px) {
    .nick-gate { align-items: flex-end; padding: 0; }
    .nick-card { max-width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
    .nick-title { font-size: 19px; }
}
