/* Reference homepage surfaces. Scoped overrides keep local rewards intact. */
.reference-home .home-section-disabled { display:none !important; }
.reference-home #cardsScroll .card-grid { grid-template-columns:repeat(var(--home-columns,3),minmax(0,1fr)) !important; }
.reference-home .home-bottom-nav { grid-template-columns:repeat(auto-fit,minmax(55px,1fr)); }
.reference-home .home-bottom-nav:not(:has(.home-bottom-item)) { display:none; }
:root {
  --home-page: #f7f7ff; --home-deep: #e7eaff; --home-panel: rgba(255,255,255,.82);
  --home-solid: #fff; --home-text: #20214c; --home-muted: #6c7199;
  --home-primary: #6652df; --home-accent: #168fc7; --home-line: rgba(100,87,201,.25);
  --home-shadow: 0 6px 20px rgba(3,9,23,.18);
}
html[data-header-mode="dark"] {
  --home-page:#06091d; --home-deep:#10153b; --home-panel:rgba(13,18,52,.78);
  --home-solid:#11173e; --home-text:#f5f4ff; --home-muted:#a9b1dc;
  --home-primary:#765cff; --home-accent:#34d6ff; --home-line:rgba(125,112,255,.38);
}
html[data-home-theme="original"] { --home-primary:#2476ef; --home-accent:#17b8c7; }
html[data-home-theme="aurora"] { --home-primary:#1ba693; --home-accent:#6958ce; --home-page:#f5fffc; --home-deep:#d8f5ed; }
html[data-home-theme="particles"] { --home-primary:#237eb2; --home-accent:#20c3d5; --home-page:#f4fbff; --home-deep:#d8eef7; }
html[data-home-theme="esports"] { --home-primary:#d93463; --home-accent:#5949d5; --home-page:#fff8fb; --home-deep:#f5dfe8; }
html[data-home-theme="arcade"] { --home-primary:#7948da; --home-accent:#da56b3; --home-page:#fff9fd; --home-deep:#f0dcff; }
html[data-home-theme="gold"] { --home-primary:#9f793e; --home-accent:#c18f38; --home-page:#fffdf8; --home-deep:#ead9b9; }
html[data-header-mode="dark"][data-home-theme="aurora"] { --home-page:#07262b; --home-deep:#13433e; --home-panel:#0b3337; --home-solid:#0b3337; }
html[data-header-mode="dark"][data-home-theme="particles"] { --home-page:#05121b; --home-deep:#0c1f2b; --home-panel:#071923; --home-solid:#071923; }
html[data-header-mode="dark"][data-home-theme="esports"] { --home-page:#0c1420; --home-deep:#1b2a3c; --home-panel:#111c2b; --home-solid:#111c2b; }
html[data-header-mode="dark"][data-home-theme="arcade"] { --home-page:#18102b; --home-deep:#2a1742; --home-panel:#211235; --home-solid:#211235; }
html[data-header-mode="dark"][data-home-theme="gold"] { --home-page:#15120d; --home-deep:#272016; --home-panel:#211a10; --home-solid:#211a10; }
.reference-home { padding:0 0 112px; color:var(--home-text); background:linear-gradient(155deg,var(--home-page),var(--home-deep)); font-size:14px; line-height:1.5; }
.reference-home::before { content:""; position:fixed; inset:0; pointer-events:none; background-image:radial-gradient(circle,rgba(155,141,255,.45) 0 1px,transparent 1.7px),radial-gradient(circle,rgba(49,212,255,.35) 0 1px,transparent 1.6px); background-size:57px 57px,103px 103px; opacity:.25; z-index:0; }
.reference-home #bg-particles { display:none; }
.reference-home #fixedArea { background:transparent; }
.reference-home #fixedArea > header { background:linear-gradient(145deg,rgba(113,84,255,.13),transparent 38%,rgba(40,200,255,.09)),var(--home-panel); border-color:var(--home-line); color:var(--home-text); }
.reference-home #fixedArea > header .brand-logo { content:normal; }
.reference-home #fixedArea > header .nav-main-btn { min-width:106px; min-height:44px; padding:5px 12px 5px 7px; gap:8px; text-decoration:none; border-color:var(--home-line); color:var(--home-text)!important; background:linear-gradient(135deg,var(--home-solid),color-mix(in srgb,var(--home-primary) 9%,var(--home-solid))); box-shadow:inset 0 1px rgba(255,255,255,.3),0 7px 18px rgba(24,35,55,.09); }
.member-entry-icon { display:grid; place-items:center; width:30px; height:30px; color:var(--home-primary); border:1px solid var(--home-line); background:color-mix(in srgb,var(--home-primary) 12%,var(--home-solid)); border-radius:10px; font-size:22px; }
.reference-home #fixedArea > header .header-invite { min-width:44px; width:44px; height:44px; padding:8px; display:grid; place-items:center; color:var(--home-primary)!important; cursor:pointer; }
.reference-home #fixedArea > header .header-invite[hidden] { display:none; }
.header-invite svg { display:block; flex-shrink:0; }
.header-invite:focus-visible { outline:3px solid var(--home-primary); outline-offset:3px; }
.reference-home .carousel { width:calc(100% - 28px); max-width:1180px; margin:0 auto 10px; padding:0; }
.reference-home .carousel-wrap { aspect-ratio:1280/548; border:0; border-radius:18px; background:transparent; box-shadow:none; }
.reference-home .slides,.reference-home .slide { height:100%; }
.reference-home .slide { max-height:none; background:transparent; }
.reference-home .slide img { width:100%; height:100%; object-fit:cover; opacity:1; animation:none; transform:none; }
.reference-home .car-btn[hidden],.reference-home .dots[hidden] { display:none!important; }
.home-announcement { position:relative; display:flex; align-items:center; width:calc(100% - 48px); max-width:1140px; min-height:42px; margin:10px auto 12px; padding:7px 16px 7px 40px; border:1px solid var(--home-line); border-radius:16px; background:linear-gradient(120deg,color-mix(in srgb,var(--home-primary) 7%,var(--home-solid)),color-mix(in srgb,var(--home-accent) 7%,var(--home-solid))); box-shadow:0 3px 10px rgba(50,50,100,.08); overflow:hidden; }
.announcement-dot { position:absolute; left:18px; width:8px; height:8px; border-radius:50%; background:var(--home-primary); box-shadow:0 0 0 5px color-mix(in srgb,var(--home-primary) 12%,transparent); }
.announcement-viewport { width:100%; overflow:hidden; white-space:nowrap; font-size:13px; font-weight:600; }
#homeAnnouncementText { display:inline-block; padding-left:100%; animation:home-announcement-scroll 28s linear infinite; }
.home-announcement:hover #homeAnnouncementText { animation-play-state:paused; }
@keyframes home-announcement-scroll { to { transform:translateX(-100%); } }
.reference-home #apps.section { width:calc(100% - 28px); max-width:1180px; margin:0 auto 22px; padding:0; }
.reference-home .icon-ticker { margin:0; border:0; padding:4px 0; border-radius:0; background:transparent; box-shadow:none; }
.reference-home .icon-track { gap:16px; }
.reference-home .icon-item { flex:0 0 58px; width:58px; height:58px; padding:4px; border:1px solid var(--home-line); border-radius:50%; background:var(--home-solid); box-shadow:inset 0 0 0 3px color-mix(in srgb,var(--home-primary) 5%,transparent); }
.reference-home .icon-item img { width:100%; height:100%; border-radius:50%; object-fit:contain; }
.reference-home .ticker-status { display:none; }
.reference-home #cardsScroll { position:relative; z-index:1; }
.reference-home #cardsScroll .section { width:calc(100% - 48px); max-width:1140px; margin:0 auto; padding:0; }
.reference-home #cardsScroll .section h2 { position:relative; margin:0 0 28px; color:var(--home-text); font-size:28px; font-weight:750; letter-spacing:0; text-shadow:none; line-height:1.5; }
.reference-home #cardsScroll .section h2::after { width:108px; height:3px; bottom:-9px; background:linear-gradient(90deg,transparent,var(--home-primary),var(--home-accent),transparent); box-shadow:none; }
.reference-home .card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.reference-home #cardsScroll .card { position:relative; display:grid; grid-template-columns:62px minmax(0,1fr) 90px; grid-template-areas:"avatar meta cta"; align-items:center; min-height:104px; padding:16px; gap:13px; overflow:hidden; border:1px solid var(--home-line); border-radius:16px; color:var(--home-text); background:radial-gradient(circle at 86% 10%,rgba(70,197,255,.13),transparent 30%),linear-gradient(145deg,rgba(114,91,255,.12),transparent 44%),var(--home-panel); box-shadow:var(--home-shadow); animation:none; opacity:1; transform:none; backdrop-filter:none; }
.reference-home #cardsScroll .card::before { content:none; }
.reference-home #cardsScroll .card::after { content:""; position:absolute; top:-46px; right:-42px; bottom:auto; left:auto; width:104px; height:104px; border:1px solid rgba(126,113,255,.25); border-radius:50%; background:transparent; box-shadow:0 0 0 15px rgba(55,211,255,.025),0 0 0 30px rgba(115,86,255,.02); transform:none; pointer-events:none; z-index:0; }
.reference-home #cardsScroll .avatar { grid-area:avatar; width:62px; height:62px; min-height:0; border:1px solid var(--home-line); border-radius:50%; object-fit:contain; background:var(--home-solid); box-shadow:0 0 0 4px rgba(116,91,255,.1),0 0 24px rgba(52,205,255,.16); filter:none; z-index:1; }
.reference-home #cardsScroll .meta { grid-area:meta; min-width:0; padding:0; z-index:1; }
.reference-home #cardsScroll .title { font-size:16px; font-weight:750; line-height:1.35; color:var(--home-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.reference-home #cardsScroll .desc { display:block; font-size:13px; line-height:1.5; color:var(--home-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin:0; min-height:0; }
.reference-home #cardsScroll .rating { display:none; }
.reference-home #cardsScroll .go { grid-area:cta; display:flex; align-items:center; justify-content:center; width:90px; min-width:0; min-height:32px; padding:5px 8px; margin:0; border:1px solid rgba(126,225,255,.66); border-radius:8px; color:#fff; background:linear-gradient(120deg,#415ddd,#6443ba); box-shadow:none; font-size:12px; font-weight:700; line-height:1.4; white-space:nowrap; z-index:1; }
.reference-home #cardsScroll .go::before,.reference-home #cardsScroll .go::after { content:none; }
.reference-home #cardsScroll .card-official-badge { position:absolute; top:5px; right:7px; border:0; border-radius:5px; background:linear-gradient(90deg,#8553f5,#bb5aff); color:#fff; box-shadow:0 2px 6px rgba(111,61,233,.22); padding:1px 6px; font-size:10px; line-height:16px; font-weight:650; z-index:2; }
.reference-home #cardsScroll [data-badge-type="hot"] .card-official-badge { background:linear-gradient(90deg,#ff4871,#ff8046); }
.reference-home #cardsScroll [data-badge-type="official"] .card-official-badge,.reference-home #cardsScroll [data-badge-type="verified"] .card-official-badge { background:linear-gradient(90deg,#3275ef,#26bcf4); }
.reference-home .site-footer { color:var(--home-muted); margin:28px auto 0; padding:15px; font-size:12px; text-align:center; }
.reference-home .site-footer .brand-footer { display:none; }
.home-bottom-nav { position:fixed; z-index:100; left:50%; bottom:16px; transform:translateX(-50%); display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); align-items:end; width:min(920px,calc(100% - 24px)); min-height:78px; padding:8px 8px 7px; isolation:isolate; }
.home-bottom-nav::before { content:""; position:absolute; z-index:-1; inset:auto 0 0; height:40px; background:color-mix(in srgb,var(--home-solid) 94%,transparent); border:1px solid var(--home-line); border-radius:24px; box-shadow:0 -8px 24px rgba(20,36,62,.12); backdrop-filter:blur(18px) saturate(135%); }
.home-bottom-item { display:flex; flex-direction:column; align-items:center; justify-content:end; min-width:0; min-height:62px; text-decoration:none; color:var(--home-text); gap:0; }
.home-bottom-item img { width:48px; height:48px; object-fit:contain; filter:drop-shadow(0 4px 5px rgba(25,25,65,.2)); }
.home-bottom-item span { min-width:60px; padding:2px 12px; border:1px solid var(--home-line); border-radius:99px; background:linear-gradient(180deg,var(--home-primary),#332d69); color:#fff; font-size:11px; line-height:16px; font-weight:700; text-align:center; }
.home-bottom-item[aria-current] { transform:translateY(-4px); }
.home-bottom-lottery { position:relative; border:0; padding:0; background:transparent; font:inherit; cursor:pointer; }
.home-bottom-lottery:disabled { opacity:.55; cursor:not-allowed; }
.home-bottom-service { border:0; padding:0; background:transparent; font:inherit; cursor:pointer; }
.reference-home .service-panel { position:fixed; right:20px; bottom:110px; max-height:calc(100dvh - 150px); overflow-y:auto; background:var(--home-solid); color:var(--home-text); }
.home-bottom-lottery em { position:absolute; top:0; left:calc(50% + 15px); min-width:17px; padding:0 3px; border:2px solid white; border-radius:99px; background:#f05264; color:white; font:700 10px/15px sans-serif; }
.home-bottom-lottery em[hidden] { display:none; }
.home-bottom-item:hover img { transform:translateY(-3px); }
.home-tools-toggle { position:fixed; z-index:105; right:18px; bottom:108px; width:46px; height:46px; border:1px solid var(--home-line); border-radius:50%; color:var(--home-primary); background:var(--home-panel); box-shadow:var(--home-shadow); font-size:24px; cursor:pointer; }
.home-tools { position:fixed; right:18px; bottom:162px; z-index:110; width:180px; padding:8px; border:1px solid var(--home-line); border-radius:16px; background:var(--home-solid); box-shadow:var(--home-shadow); }
.home-tools[hidden] { display:none; }
.home-tools:not([hidden]) { display:block; }
/* Retire duplicate floating controls; keep the service panel for bottom navigation. */
.reference-home #backTop,
.reference-home #serviceToggle,
.reference-home .home-tools-toggle,
.reference-home #homeTools { display:none !important; }
.home-tools button { display:block; width:100%; border:0; padding:11px; border-radius:9px; background:transparent; color:var(--home-text); font:inherit; cursor:pointer; text-align:left; }
.home-tools button:hover { background:color-mix(in srgb,var(--home-primary) 10%,transparent); }
.reference-home .reward-float-stack,.reference-home .service-float-btn { bottom:110px; }
.reference-home .service-float-btn { right:76px; }
.reference-home .back-top { bottom:170px; }
.reference-home .popup-modal { width:min(520px,calc(100vw - 28px)); color:var(--home-text); background:var(--home-solid); }
.reference-home .popup-content { color:var(--home-text); line-height:1.9; }
.reference-home .popup-content h2 { text-align:center; font-size:28px; margin:10px 0 16px; }
.reference-home .popup-btn { background:linear-gradient(120deg,#415ddd,#6443ba); }
.reference-home .popup-close { width:44px; height:44px; min-width:44px; min-height:44px; border:1px solid #d9d3ff; border-radius:14px; background-color:#fff; background-image:var(--home-close-art); background-position:center; background-repeat:no-repeat; background-size:27px; color:transparent; font-size:0; box-shadow:0 7px 18px rgba(60,64,94,.12); }
.home-service-row { display:flex; align-items:center; gap:10px; margin:7px 0; padding:10px; border:1px solid var(--home-line); border-radius:12px; background:var(--home-solid); color:var(--home-text); }
.home-service-row img { width:42px; height:42px; border-radius:10px; object-fit:contain; }
.home-service-row .home-service-copy { flex:1; min-width:0; }
.home-service-row small { display:block; color:var(--home-muted); }
.home-service-row a,.home-service-row button { border:1px solid var(--home-line); border-radius:8px; background:transparent; padding:6px 10px; color:var(--home-primary); font-size:12px; text-decoration:none; cursor:pointer; }
@media (max-width:1050px) and (min-width:769px) {
  .reference-home #cardsScroll .card { grid-template-columns:50px minmax(0,1fr) 74px; gap:8px; padding:13px; }
  .reference-home #cardsScroll .avatar { width:50px; height:50px; }
  .reference-home #cardsScroll .go { width:74px; }
  .reference-home #cardsScroll .title { font-size:14px; }
}
@media (max-width:768px) {
  .reference-home { padding-bottom:96px; }
  .reference-home .carousel { width:calc(100% - 24px); }
  .reference-home .carousel-wrap { border-radius:14px; }
  .home-announcement { width:calc(100% - 28px); min-height:36px; margin:8px auto; padding:6px 10px 6px 34px; }
  .announcement-dot { left:14px; width:7px; height:7px; }
  .announcement-viewport { font-size:11px; }
  .reference-home #apps.section { width:calc(100% - 24px); margin-bottom:18px; }
  .reference-home .icon-item { flex-basis:44px; width:44px; height:44px; padding:3px; }
  .reference-home .icon-track { gap:12px; }
  .reference-home #cardsScroll .section { width:calc(100% - 24px); }
  .reference-home #cardsScroll .section h2 { font-size:21px; margin-bottom:20px; }
  .reference-home #cardsScroll .card-grid { grid-template-columns:repeat(var(--home-mobile-columns,3),minmax(0,1fr)) !important; gap:6px; }
  .reference-home #cardsScroll .card { min-height:122px; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto auto; grid-template-areas:"avatar" "meta" "cta"; justify-items:center; gap:5px; padding:8px 5px 6px; border-radius:12px; }
  .reference-home #cardsScroll .avatar { width:44px; height:44px; }
  .reference-home #cardsScroll .meta { width:100%; text-align:center; }
  .reference-home #cardsScroll .title { font-size:13px; }
  .reference-home #cardsScroll .desc { display:none; }
  .reference-home #cardsScroll .go { width:100%; min-height:32px; padding:3px; font-size:10px; }
  .reference-home #cardsScroll .card-official-badge { top:3px; right:3px; font-size:8px; line-height:13px; padding:0 4px; }
  .home-bottom-nav { bottom:0; width:100%; padding-bottom:calc(6px + env(safe-area-inset-bottom,0px)); }
  .home-bottom-nav::before { border-radius:22px 22px 0 0; height:calc(40px + env(safe-area-inset-bottom,0px)); }
  .home-bottom-item span { min-width:42px; font-size:10px; padding-inline:8px; }
  .home-bottom-item img { width:42px; height:42px; }
  .reference-home .popup-content h2 { font-size:23px; }
}
@media (prefers-reduced-motion:reduce) { #homeAnnouncementText { animation:none; padding-left:0; } .home-bottom-item img { transition:none; } }
