/* 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 { 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:116px; width:auto; height:44px; padding:8px 12px; display:flex; align-items:center; justify-content:center; gap:8px; flex-shrink:0; color:var(--home-primary)!important; cursor:pointer; }
.header-invite-label { white-space:nowrap; font-size:14px; font-weight:700; line-height:1; }
.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:var(--ng-banner-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; }
/* The script sets --ng-banner-ratio from the active image's natural size.
   Contain prevents a transient crop while a newly selected banner loads. */
.reference-home .slide img { width:100%; height:100%; object-fit:contain; 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; }
.reference-home .service-panel { position:fixed; right:20px; bottom:110px; width:min(390px,calc(100vw - 24px)); box-sizing:border-box; max-height:min(550px,calc(100dvh - 132px)); padding:0; display:flex; flex-direction:column; overflow:hidden; border:1px solid #dcd6fa; border-radius:22px; background:#fff; color:#252641; box-shadow:0 18px 55px rgba(43,35,91,.22); }
.reference-home .service-panel-header { flex:none; display:flex; align-items:center; gap:14px; min-height:82px; box-sizing:border-box; margin:0; padding:16px 17px; border-bottom:1px solid #ded8f7; background:linear-gradient(115deg,#f2efff,#f8f9fc); }
.reference-home .service-panel-symbol { flex:none; width:44px; height:44px; object-fit:contain; }
.reference-home .service-panel-heading { flex:1; min-width:0; }
.reference-home .service-panel-title { margin:0; color:#172943; font-size:18px; font-weight:800; line-height:1.4; }
.reference-home .service-panel-subtitle { margin:3px 0 0; color:#506080; font-size:12px; line-height:1.5; }
.reference-home .service-panel-close { flex:none; width:44px; height:44px; min-width:44px; min-height:44px; padding:0; display:grid; place-items:center; border:1px solid #bbb0f3; border-radius:14px; background:#f5f2ff; color:#27263e; box-shadow:0 6px 15px rgba(51,40,93,.12); }
.reference-home .service-panel-close:hover { background:#eae4ff; color:#5140a1; }
.reference-home .service-panel-close svg { display:block; }
.reference-home .service-panel-body { min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#999 transparent; padding:20px 17px 18px; }
.reference-home .service-panel-body::-webkit-scrollbar { width:6px; }
.reference-home .service-panel-body::-webkit-scrollbar-thumb { background:#999; border-radius:8px; }
.reference-home .service-panel-count { margin:2px 0 12px; color:#70688b; font-size:12px; line-height:1.5; }
.reference-home .service-list { display:flex; flex-direction:column; gap:10px; }
.reference-home .service-empty { margin:0; padding:24px 8px; text-align:center; color:#70688b; }
.reference-home .service-panel :is(a,button):focus-visible { outline:2px solid #7854ed; outline-offset: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-overlay { padding:20px 12px; background:rgba(15,24,44,.52); backdrop-filter:blur(7px); -webkit-backdrop-filter:blur(7px); }
.reference-home .popup-modal { box-sizing:border-box; width:min(520px,100%); max-height:calc(100dvh - 40px); color:#243856; background:#fff; border:1px solid #e2dcf7; border-radius:24px; box-shadow:0 24px 65px rgba(13,22,47,.3); }
.reference-home .popup-hero { flex:0 0 auto; aspect-ratio:520/234; min-height:0; background:#eef0fa; }
.reference-home .popup-hero::after { content:none; }
.reference-home .popup-hero img { object-fit:cover; }
.reference-home .popup-body { padding:26px 30px 14px; }
.reference-home .popup-content { color:#243856; font-size:16px; line-height:1.8; }
.reference-home .popup-content h2 { text-align:center; color:#193c7c; font-size:30px; font-weight:800; line-height:1.3; margin:0 0 18px; overflow-wrap:anywhere; white-space:pre-line; }
.reference-home .notice-copy { max-height:10.8em; overflow:hidden; white-space:pre-wrap; overflow-wrap:anywhere; }
.reference-home .notice-copy.is-expanded { max-height:none; }
.reference-home .notice-highlight { color:#e22529; font-weight:700; }
.reference-home .notice-expand { display:block; border:0; background:transparent; color:#7350ea; margin:12px 0 0; padding:6px 0; min-height:32px; font-family:inherit; font-size:13px; font-weight:600; line-height:1.5; cursor:pointer; }
.reference-home .popup-footer { padding:14px 30px 28px; background:#fff; }
.reference-home .popup-btn { box-sizing:border-box; min-height:50px; padding:12px 20px; border:1px solid #b6a1f7; border-radius:12px; background:#6a50ce; box-shadow:none; font-size:17px; line-height:24px; text-align:center; text-decoration:none; }
.reference-home .popup-btn:hover { background:#5c42be; box-shadow:0 6px 18px rgba(106,80,206,.2); }
.reference-home .popup-modal [hidden] { display:none !important; }
.reference-home .popup-modal :is(button,a):focus-visible { outline:3px solid #b4a3f4; outline-offset:3px; }
.reference-home .popup-close { display:grid; place-items:center; padding:0; width:44px; height:44px; min-width:44px; min-height:44px; border:1px solid #d9d3ff; border-radius:14px; background:#f7f5ff; color:#28253f; font-size:0; box-shadow:0 7px 18px rgba(60,64,94,.12); }
.home-service-row { display:flex; align-items:center; gap:10px; min-height:76px; box-sizing:border-box; margin:0; padding:12px; border:1px solid #dcd5fc; border-radius:18px; background:#fff; color:#252641; transition:border-color .18s,background-color .18s; }
.home-service-row:hover { border-color:#b5a5f4; background:#fcfbff; }
.home-service-row img { flex-shrink:0; width:42px; height:42px; border-radius:10px; object-fit:contain; }
.home-service-row .home-service-copy { flex:1; min-width:0; overflow-wrap:anywhere; }
.home-service-row strong { display:block; font-size:14px; font-weight:700; line-height:1.5; }
.home-service-row small { display:block; margin-top:3px; color:#6e698a; font-size:12px; line-height:1.5; }
.home-service-row a,.home-service-row button { flex-shrink:0; display:grid; place-items:center; min-width:44px; min-height:44px; box-sizing:border-box; white-space:nowrap; border:0; border-radius:9px; background:transparent; padding:6px 0; color:#704cec; font-family:inherit; font-size:12px; font-weight:600; line-height:1.5; 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 .service-panel { right:12px; bottom:calc(88px + env(safe-area-inset-bottom,0px)); max-height:min(550px,calc(100dvh - 112px - env(safe-area-inset-bottom,0px))); }
  .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; }
  .reference-home .popup-content h2 { font-size:clamp(22px,5.8vw,28px); }
  .reference-home .popup-body { padding:20px 20px 10px; }
  .reference-home .popup-footer { padding:12px 20px 20px; }
  .reference-home .popup-content { font-size:15px; }
}
@media (max-height:560px) {
  .reference-home .popup-hero { flex-basis:120px; aspect-ratio:auto; }
  .reference-home .popup-body { padding-top:16px; }
}
@media (prefers-reduced-motion:reduce) { #homeAnnouncementText { animation:none; padding-left:0; } }
