/* Friends — supplied green/gold 3D reference; existing referral/visit handlers. */
#dialog:has(.friends-home-3d){box-sizing:border-box;width:min(470px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:92dvh;padding:20px 18px;border:1px solid #6b5a2e88;border-radius:26px;background:linear-gradient(145deg,#1d3729,#132a1c 65%);color:#efe6cc;scrollbar-width:thin;scrollbar-color:#6b5a2e transparent;box-shadow:inset 0 1px 1px #d9d1a022,0 20px 60px #0008}
#dialog:has(.friends-home-3d) .dialog-top{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-20px;z-index:3;background:#1a3325;margin:0 0 18px;padding:6px 0 12px}
#dialog:has(.friends-home-3d) #dialogTitle{font:700 2rem/1.15 Georgia,serif;color:#f1e8ca;text-shadow:0 2px 0 #08180e}
#dialog:has(.friends-home-3d) #close{flex:none;width:44px;height:44px;min-height:44px;border:1px solid #907d43;border-radius:50%;background:linear-gradient(#2b4934,#193324);box-shadow:inset 0 1px 1px #dce9ba22,0 4px 0 #0c2115,0 7px 12px #0004;color:#e8cf89;font-size:28px}
.friends-home-3d{display:flex;flex-direction:column;gap:18px;min-height:min(690px,calc(92dvh - 110px));max-width:none;margin:0}
.friends-home-3d .friends-reward-panel{padding:16px 14px 14px;border:1px solid #96ac8733;border-radius:24px;background:radial-gradient(ellipse at 50% 30%,#47784f55,transparent 70%),linear-gradient(130deg,#2a4936,#1d3b28);box-shadow:inset 0 1px 0 #d5e5b919,0 5px 0 #10271b,0 10px 17px #0003}
.friends-home-3d .friends-reward-hero{padding:0;border:0;border-radius:0;background:none;overflow:visible}.friends-home-3d .friends-reward-hero:before{display:none}
.friends-home-3d .friends-reward-art{height:118px;gap:20px;margin-bottom:6px}.friends-home-3d .friends-reward-art>img{width:118px;height:118px;filter:drop-shadow(0 8px 8px #06170c99) drop-shadow(0 0 10px #f2dd7a40)}
.friends-home-3d .friends-seal{width:44px;height:44px;padding:10px;border:1px solid #8e7d42;border-radius:50%;background:linear-gradient(#35503a,#1e3b28);box-shadow:inset 0 1px 0 #d6e7b624,0 4px 0 #0a2114,0 7px 10px #0004}
.friends-home-3d .friends-reward-hero>p{font-size:1rem;line-height:1.35;margin:5px 0;color:#d2dfc6}
.friends-home-3d .friends-reward-hero>strong{font:700 3rem/1.15 Georgia,serif;color:#f0d18a;text-shadow:0 3px 1px #51421a;letter-spacing:-.025em}.friends-home-3d .friends-reward-hero>strong>span{font:500 1.1rem/1.2 'Ayupov Sans',Arial,sans-serif;letter-spacing:0;color:#d5dfc6;text-shadow:none;margin-left:4px}
.friends-home-3d .friends-scoreboard{display:grid;grid-template-columns:1fr 1fr;gap:0;overflow:hidden;border:1px solid #60815b26;border-radius:20px;background:#0c2518;box-shadow:inset 0 4px 8px #0008,0 1px 0 #c7e1b717;margin:14px 0 0}
.friends-home-3d .friends-scoreboard>div{min-width:0;border:0;border-radius:0;background:none;padding:12px 6px}.friends-home-3d .friends-scoreboard>div+div{border-left:1px solid #77936d40}.friends-home-3d .friends-scoreboard small{font-size:.8125rem;color:#b8ccb0;margin:0 0 6px}.friends-home-3d .friends-scoreboard strong{font:700 1.75rem/1.2 'Ayupov Sans',Arial,sans-serif;color:#ecd08b;text-shadow:0 2px 1px #3d3214}.friends-home-3d .friends-scoreboard strong>span{font-size:.875rem;font-weight:500}
.friends-players-hub{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px;padding:12px;border:1px solid #8c7d42;border-radius:20px;background:linear-gradient(130deg,#2b4935,#1e3a28);box-shadow:inset 0 1px 1px #dbe4bd22,0 5px 0 #10271b,0 9px 14px #0004}
.friends-hub-icon{display:grid;place-items:center;width:38px;height:42px;padding:9px;background:linear-gradient(135deg,#fff0b4,#d2b267);border-radius:12px;color:#3f431f;box-shadow:inset 0 1px 0 #fff9,0 4px 5px #0004}.friends-game .friends-hub-icon svg{stroke:currentColor;stroke-width:1.7}
.friends-players-hub>div{min-width:0}.friends-players-hub strong{display:block;font-size:.9375rem;line-height:1.25;color:#ece5c4;margin-bottom:4px}.friends-players-hub small{display:block;font-size:.75rem;line-height:1.35;color:#aebfa7}
.friends-hub-actions{display:flex;gap:2px;padding:3px;border-radius:13px;background:#081f13;box-shadow:inset 0 3px 5px #0006}.friends-hub-actions button{min-height:40px;min-width:0;padding:8px 7px;border:0;border-radius:10px;background:none;color:#d7e2cb;font-size:.75rem;font-weight:600}.friends-hub-actions #friendsLeague{background:linear-gradient(#ffeab1,#d1b36b);color:#303b21;box-shadow:inset 0 1px 0 #fff8,0 2px 0 #8d793d}
.friends-home-3d .friends-list-title{display:flex;align-items:center;justify-content:space-between;gap:12px;font:700 1.4rem/1.2 Georgia,serif;color:#efe4be;margin:2px 0 -4px}.friends-home-3d .friends-list-title>span{font:400 .875rem/1.2 'Ayupov Sans',Arial,sans-serif;color:#b3c8a9}
.friends-home-3d .friend-list{display:grid;gap:12px;margin:0}.friends-home-3d .friend-card{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:76px;padding:12px;border:1px solid #8aa37b2c;border-radius:20px;background:linear-gradient(130deg,#2c4b36,#1c3826);box-shadow:inset 0 1px 0 #d5e7b51c,0 5px 0 #10271b,0 9px 14px #0003;text-align:left;color:#ece4c4;margin:0}
.friends-home-3d .friend-avatar{display:grid;place-items:center;width:42px;height:42px;min-width:42px;flex:none;border:0;border-radius:50%;background:radial-gradient(circle at 30% 20%,#ffeab0,#cfb36e 60%,#9b7b3e);box-shadow:inset 0 1px 1px #fff7,0 5px 8px #0005;font:700 1.5rem Georgia,serif;color:#39432a}
.friends-home-3d .friend-card>span:nth-child(2){min-width:0}.friends-home-3d .friend-card b{display:block;font:700 1rem/1.3 Georgia,serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#efe4bc}.friends-home-3d .friend-card small{display:block;color:#b4c8a9;font-size:.75rem;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:5px}
.friends-home-3d .friend-card>span:last-child{max-width:90px;padding:7px 8px;border-radius:10px;background:#0c2518;box-shadow:inset 0 2px 4px #0005;font-size:.75rem;line-height:1.25;color:#e0d49c;text-align:center}
.friends-home-3d .friends-home-footer{margin-top:auto;padding-top:20px;text-align:center}.friends-home-3d #inviteFriend{min-height:52px;margin:0;padding:14px;border:1px solid #e5d39b;border-radius:16px;background:linear-gradient(#fff0ba,#e0c27d 70%,#b69a58);box-shadow:inset 0 1px 0 #fff9,0 5px 0 #8d773c,0 9px 14px #0005;color:#253b25;font-size:1rem;font-weight:700}
.friends-home-3d .friends-caption{font-size:.8125rem;line-height:1.5;color:#b6cbaa;margin:12px 0 0}.friends-home-3d .friends-terms{border:0;margin:0;padding:0}.friends-home-3d .friends-terms summary{font-size:.8125rem;min-height:44px;padding:8px 0;color:#d9cd95;text-decoration:underline;display:list-item;list-style:none}.friends-home-3d .friends-terms p{font-size:.875rem;line-height:1.5;color:#b8cbb0;text-align:left}
.friends-home-3d .friends-empty{min-height:76px;padding:10px 0}.friends-home-3d .friends-help{font-size:.875rem;line-height:1.4;margin:0;color:#b8d9ad}
@media(max-width:360px){#dialog:has(.friends-home-3d){padding:18px 14px}.friends-home-3d{gap:16px}.friends-home-3d .friends-reward-panel{padding:14px 10px 12px}.friends-home-3d .friends-reward-art{gap:15px;height:105px}.friends-home-3d .friends-reward-art>img{width:105px;height:105px}.friends-home-3d .friends-seal{width:38px;height:38px;padding:9px}.friends-players-hub{padding:10px;gap:8px;grid-template-columns:34px minmax(0,1fr) auto}.friends-hub-icon{width:34px;height:38px;padding:8px}.friends-hub-actions button{padding:8px 6px}.friends-home-3d .friend-card{gap:8px;padding:11px}.friends-home-3d .friends-home-footer{padding-top:14px}}

.friends-home-3d .friends-reward-compact{padding:14px;border-radius:20px}
.friends-compact-heading{display:flex;gap:10px;align-items:center;text-align:left}
.friends-compact-heading>img{flex:none;width:44px;height:44px;object-fit:contain}
.friends-compact-heading>div{min-width:0}
.friends-compact-heading strong{display:block;color:#efda9c;font-size:1rem;line-height:1.4}
.friends-compact-heading small{display:block;color:#bdceb5;font-size:.875rem;margin-top:3px}
.friends-home-3d .friends-reward-compact .friends-scoreboard{margin:12px 0 0;border-radius:12px}
.friends-home-3d .friends-reward-compact .friends-scoreboard>div{padding:8px 5px}
.friends-home-3d .friends-reward-compact .friends-scoreboard small{font-size:.8125rem;margin-bottom:3px}
.friends-home-3d .friends-reward-compact .friends-scoreboard strong{font-size:1.15rem}
.friends-home-3d .friends-reward-compact #inviteFriend{min-height:44px;padding:10px;margin-top:12px}

.friends-search{display:block;margin:12px 0 0;color:#d5ddc6;font-size:.875rem}
.friends-search input{display:block;box-sizing:border-box;width:100%;min-height:44px;margin:7px 0 0;padding:10px 12px;border:1px solid #bca46177;border-radius:12px;background:#102d20;color:#eee4c5;font:1rem/1.4 'Ayupov Sans',Arial,sans-serif}
.friends-search input:focus-visible{outline:2px solid #edcf7a;outline-offset:2px}
.friends-search-result{font-size:.875rem;color:#d8d4b0;margin:10px 0}
.friends-home-3d .friend-card[hidden],.friends-search-result[hidden]{display:none!important}

.friends-home-3d .friends-players-hub{grid-template-columns:38px minmax(0,1fr)}
.friends-home-3d .friends-hub-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}
.friends-home-3d .friends-hub-actions button{min-height:44px;white-space:normal;font-size:.875rem;line-height:1.3;padding:8px 6px}
