/* Homepage (index.php). Shared pieces (rails, buttons, frame) live in app.css. */

.hm-sec { position: relative; z-index: 1; padding: 10px 0; }
.hm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.hm-head-col { flex-wrap: wrap; }
.hm-h2 { display: flex; align-items: center; gap: 9px; font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.hm-h2 i { width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; background: var(--blue-dim); color: var(--blue-light); }

/* Hero */
.hm-hero { position: relative; z-index: 1; padding: 18px 0 8px; }
.hm-hi { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; padding: 4px 10px; border-radius: var(--r-full); background: var(--bg-float); border: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-sub); }
.hm-hi b { color: var(--text); }
.hm-hi i { color: var(--accent); font-size: .7rem; }
.hm-title { font-size: clamp(1.55rem, 5.2vw, 2.4rem); font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.hm-title span { color: var(--accent); }
.hm-lead { margin-top: 6px; font-size: var(--fs-sm); color: var(--text-sub); max-width: 46ch; }
.hm-search {
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; height: 48px; margin-top: 14px; padding: 0 8px 0 16px;
  background: var(--bg-raised); border: 1px solid var(--border-md); border-radius: 14px; box-shadow: var(--sh-1);
  color: var(--text-muted); font-weight: 500; font-size: var(--fs-sm); font-family: inherit; text-align: left; cursor: text;   /* reads like a field's hint */
  transition: border-color var(--dur-2), box-shadow var(--dur-2), transform var(--dur-1);
}
.hm-search > i { color: var(--blue-light); }
.hm-search span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-search kbd { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: var(--bg-float); border: 1px solid var(--border-md); font-weight: 700; font-size: .75rem; font-family: inherit; color: var(--text-muted); }
.hm-search:hover { border-color: rgb(var(--blue-rgb) / .55); box-shadow: 0 0 0 4px rgb(var(--blue-rgb) / .12); }
.hm-search:active { transform: scale(.99); }
@media (hover: none) { .hm-search kbd { display: none; } }
.hm-trust { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; }
.hm-trust li { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-sub); }
.hm-trust i { color: var(--blue-light); font-size: .7rem; }

/* Offers carousel: native swipe, one slide and a peek on phones, two on wide screens */
.promo-wrap { position: relative; }
.promo-track {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  margin: 0 calc(-1 * clamp(.9rem, 3vw, 2rem)); padding: 2px clamp(.9rem, 3vw, 2rem) 4px; scroll-padding-inline: clamp(.9rem, 3vw, 2rem);
}
.promo-track::-webkit-scrollbar { display: none; }
.promo-card {
  position: relative; flex: 0 0 88%; aspect-ratio: 16 / 9; scroll-snap-align: start; overflow: hidden;
  border-radius: 16px; border: 1px solid var(--border-md); background: linear-gradient(135deg, var(--bg-float), var(--bg-hover));
  isolation: isolate;
}
.promo-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); z-index: -1; }
.promo-card:hover img { transform: scale(1.05); }
.promo-fade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(4,6,14,.88) 0%, rgba(4,6,14,.35) 38%, transparent 64%); pointer-events: none; }
.promo-content { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; color: #fff; }
.promo-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--r-full); font-size: .6rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--blue); color: #fff; }
.promo-badge.is-hot { background: #ef4444; } .promo-badge.is-new { background: #16a34a; } .promo-badge.is-gold { background: var(--accent-bg); color: var(--on-accent); }
.promo-title { font: 700 1.02rem/1.2 var(--font-head); text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.promo-desc { font-size: var(--fs-xs); color: rgba(255,255,255,.78); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.promo-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: var(--fs-xs); font-weight: 800; color: #fff; }
.promo-cta i { font-size: .6rem; transition: transform var(--dur-2) var(--ease-out); }
.promo-card:hover .promo-cta i { transform: translateX(3px); }
.promo-btn {
  position: absolute; top: 50%; z-index: 2; width: 36px; height: 36px; margin-top: -18px; border-radius: 50%;
  display: none; align-items: center; justify-content: center; cursor: pointer;
  background: rgba(6,9,18,.7); color: #fff; border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px);
  transition: background var(--dur-1), transform var(--dur-1);
}
.promo-btn:hover { background: var(--blue); }
.promo-btn:active { transform: scale(.92); }
.promo-btn.is-prev { left: -6px; } .promo-btn.is-next { right: -6px; }
.promo-dots { display: flex; justify-content: center; gap: 5px; margin-top: 8px; }
.promo-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 99px; background: var(--border-lg); cursor: pointer; transition: width var(--dur-2) var(--ease-out), background var(--dur-2); }
.promo-dots button.on { width: 18px; background: var(--accent); }
@media (min-width: 720px) {
  .promo-card { flex-basis: calc(50% - 5px); }
  .promo-btn { display: flex; }
}

/* Games grid */
.hm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
@media (min-width: 560px) { .hm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 860px) { .hm-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 12px; } }

/* How it works */
.hm-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; counter-reset: s; }
@media (min-width: 860px) { .hm-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }
.hm-step { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 14px; background: var(--bg-raised); border: 1px solid var(--border); }
.hm-step-ic { position: relative; width: 34px; height: 34px; margin-bottom: 4px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: .82rem; background: var(--blue-dim); color: var(--blue-light); }
.hm-step-ic b { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 700 .6rem var(--font-head); background: var(--accent-bg); color: var(--on-accent); border: 2px solid var(--bg-raised); }
.hm-step-t { font-size: var(--fs-sm); font-weight: 700; color: var(--text); }
.hm-step-d { font-size: var(--fs-xs); color: var(--text-sub); line-height: 1.45; }

/* FAQ */
.hm-faq-search { position: relative; flex: 1; max-width: 300px; min-width: 200px; }
.hm-faq-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: .75rem; color: var(--text-muted); pointer-events: none; }
.hm-faq-search input { width: 100%; height: 38px; padding: 0 12px 0 34px; border-radius: var(--r-full); background: var(--bg-raised); border: 1px solid var(--border-md); color: var(--text); font-weight: 500; font-size: var(--fs-sm); font-family: inherit; outline: none; transition: border-color var(--dur-2), box-shadow var(--dur-2); }
.hm-faq-search input:focus { border-color: rgb(var(--blue-rgb) / .6); box-shadow: 0 0 0 3px rgb(var(--blue-rgb) / .14); }
@media (max-width: 560px) { .hm-faq-search { max-width: none; flex-basis: 100%; } }
.hm-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * clamp(.9rem, 3vw, 2rem)) 10px; padding: 0 clamp(.9rem, 3vw, 2rem); }
.hm-chips::-webkit-scrollbar { display: none; }
.hm-chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-full); background: var(--bg-raised); border: 1px solid var(--border-md); color: var(--text-sub); font-weight: 600; font-size: var(--fs-xs); font-family: inherit; cursor: pointer; transition: background var(--dur-1), color var(--dur-1), border-color var(--dur-1); }
.hm-chip i { font-size: .65rem; }
.hm-chip span { padding: 0 6px; border-radius: var(--r-full); background: var(--blue-dim); color: var(--blue-light); font-size: .625rem; font-weight: 800; }
.hm-chip:hover { color: var(--text); border-color: var(--border-lg); }
.hm-chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.hm-chip.active span { background: rgba(255,255,255,.2); color: #fff; }
.hm-faqs { display: grid; grid-template-columns: 1fr; gap: 6px; align-items: start; }
@media (min-width: 860px) { .hm-faqs { grid-template-columns: 1fr 1fr; gap: 8px 10px; } }
.faq { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; transition: border-color var(--dur-2), background var(--dur-2); }
.faq[hidden] { display: none; }
.faq[open] { border-color: rgb(var(--blue-rgb) / .4); }
.faq summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 7px 12px 7px 8px; list-style: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.faq summary::-webkit-details-marker { display: none; }
.faq-ic { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: .72rem; background: var(--bg-float); color: var(--blue-light); transition: background var(--dur-2), color var(--dur-2); }
.faq[open] .faq-ic { background: var(--blue); color: #fff; }
.faq-q { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text); line-height: 1.35; }
.faq-chev { font-size: .62rem; color: var(--text-muted); transition: transform var(--dur-2) var(--ease-out); }
.faq[open] .faq-chev { transform: rotate(180deg); color: var(--blue-light); }
.faq-a { padding: 0 14px 12px 48px; font-size: var(--fs-sm); color: var(--text-sub); line-height: 1.65; animation: faqIn var(--dur-3) var(--ease-out); }
.faq-a a { color: var(--blue-light); text-decoration: underline; text-underline-offset: 2px; }
.faq-a strong { color: var(--text); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.hm-faqs:not(.is-all) .faq.is-extra { display: none; }
.hm-more-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 320px; height: 40px; margin: 10px auto 0; border-radius: var(--r-full); background: var(--bg-raised); border: 1px solid var(--border-md); color: var(--text); font-weight: 700; font-size: var(--fs-sm); font-family: inherit; cursor: pointer; transition: background var(--dur-1), border-color var(--dur-1); }
.hm-more-btn i { font-size: .65rem; color: var(--blue-light); transition: transform var(--dur-2) var(--ease-out); }
.hm-more-btn .is-less, .hm-more-btn.is-open .is-more { display: none; }
.hm-more-btn.is-open .is-less { display: inline; }
.hm-more-btn.is-open i { transform: rotate(180deg); }
.hm-more-btn:hover { background: var(--bg-hover); border-color: var(--border-lg); }
.hm-more-btn[hidden] { display: none; }
.faq-none { grid-column: 1 / -1; padding: 18px; text-align: center; font-size: var(--fs-sm); color: var(--text-muted); }
.faq-none a { color: var(--blue-light); }

/* Closing call to action */
.hm-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 18px; border-radius: 18px; border: 1px solid var(--border-md); overflow: hidden; position: relative;
  background: radial-gradient(120% 140% at 100% 0%, rgb(var(--blue-rgb) / .22), transparent 60%), radial-gradient(80% 120% at 0% 100%, rgba(255,122,26,.12), transparent 60%), var(--bg-raised);
}
.hm-cta-t { font-size: 1.25rem; font-weight: 700; }
.hm-cta p { margin-top: 2px; font-size: var(--fs-sm); color: var(--text-sub); }
.hm-cta-btns { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) { .hm-cta-btns { width: 100%; } .hm-cta-btns .btn { flex: 1; } }

/* Scroll reveal: a short rise, staggered by --i */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); transition-delay: calc(var(--i, 0) * 45ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .promo-card img, .gcard-img img { transition: none; } }

/* App download card (includes/app-promo.php) */
.app-card {
  display: grid; grid-template-columns: 1fr; gap: 16px; padding: 16px; border-radius: 18px; overflow: hidden; position: relative;
  border: 1px solid var(--border-md);
  background: radial-gradient(90% 120% at 100% 0%, rgb(var(--blue-rgb) / .2), transparent 60%), var(--bg-raised);
}
.app-title { font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.app-sub { margin-top: 4px; font-size: var(--fs-sm); color: var(--text-sub); max-width: 48ch; }
.app-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 12px 0 14px; }
.app-feats li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--bg-float); border: 1px solid var(--border); font-size: var(--fs-xs); font-weight: 600; color: var(--text); }
.app-feats i { color: var(--blue-light); font-size: .72rem; }
.app-actions { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.app-dl-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border-radius: 14px;
  background: var(--blue); color: #fff; box-shadow: 0 8px 22px rgb(var(--blue-rgb) / .35);
  transition: background var(--dur-1), transform var(--dur-1);
}
.app-dl-btn:hover { background: var(--blue-dark); }
.app-dl-btn:active { transform: scale(.97); }
.app-dl-btn > i { font-size: 1.3rem; }
.app-dl-btn span { display: flex; flex-direction: column; line-height: 1.1; }
.app-dl-btn small { font-size: .6rem; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
.app-dl-btn strong { font-size: .95rem; }
.app-dl-btn.is-installed { background: #16a34a; box-shadow: 0 8px 22px rgba(22,163,74,.3); }
.app-note { font-size: var(--fs-2xs); color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; }
.app-note i { color: var(--pos); }
/* The phone. On phones it rises out of the top of the card, cropped and faded;
   on a computer it stands beside the text and tilts toward the pointer. */
.app-visual { position: relative; order: -1; height: 212px; margin: -16px -16px 0; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; padding-top: 22px;
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.app-glow { position: absolute; left: 50%; top: 40px; width: 260px; height: 260px; margin-left: -130px; border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--blue-rgb) / .55), rgba(255,122,26,.18) 45%, transparent 70%); filter: blur(18px); animation: appGlow 6s ease-in-out infinite; }
.app-orbit { position: absolute; left: 50%; top: 150px; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%; border: 1px dashed rgb(var(--blue-rgb) / .18); animation: appSpin 24s linear infinite; }
.app-orbit i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-light); box-shadow: 0 0 10px var(--blue-light); }
.app-orbit i:nth-child(1) { top: -4px; left: 50%; }
.app-orbit i:nth-child(2) { bottom: 18%; left: 4%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.app-orbit i:nth-child(3) { top: 30%; right: -4px; width: 6px; height: 6px; background: #22c55e; box-shadow: 0 0 10px #22c55e; }
.app-tilt { position: relative; perspective: 900px; transform: translateY(40px); opacity: 0; transition: transform .9s var(--ease-out), opacity .9s var(--ease-out); }
.app-card.in .app-tilt { transform: none; opacity: 1; }
.app-phone {
  position: relative; width: 176px; aspect-ratio: 9 / 19; border-radius: 30px; padding: 6px;
  background: linear-gradient(145deg, #2a3350, #0b1020 45%, #1c2440); box-shadow: 0 30px 60px rgba(0,0,0,.5), inset 0 0 0 1.5px rgba(255,255,255,.1), 0 0 0 1px rgba(0,0,0,.6);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, -8deg)) rotateZ(-3deg); transform-style: preserve-3d; transition: transform .25s var(--ease-out);
  animation: appFloat 6s ease-in-out infinite;
}
.app-key { position: absolute; right: -3px; width: 3px; border-radius: 0 3px 3px 0; background: #2a3350; }
.app-key.is-pwr { top: 26%; height: 11%; }
.app-key.is-vol { top: 42%; height: 17%; }
.app-screen { position: relative; height: 100%; border-radius: 25px; overflow: hidden; padding: 7px 8px 0; display: flex; flex-direction: column; gap: 6px; color: #e7ecf7;
  background: radial-gradient(120% 60% at 50% 0%, rgb(var(--blue-rgb) / .35), transparent 60%), #060912; }
.app-status { display: flex; align-items: center; justify-content: space-between; height: 12px; font-size: .5rem; font-weight: 700; }
.app-cam { width: 9px; height: 9px; border-radius: 50%; background: #000; box-shadow: inset 0 0 0 2px #151b2e, 0 0 0 1px rgba(255,255,255,.06); }
.app-sig { display: flex; gap: 3px; font-size: .45rem; opacity: .85; }
.app-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.app-logo { font: 700 .62rem var(--font-head); letter-spacing: .12em; }
.app-bell { position: relative; font-size: .62rem; animation: appBell 3s ease-in-out infinite; transform-origin: 50% 0; }
.app-bell em { position: absolute; top: -5px; right: -6px; min-width: 11px; height: 11px; padding: 0 2px; border-radius: 6px; background: var(--accent-bg); color: #fff; font: 800 .42rem/11px var(--font-body); font-style: normal; text-align: center; }
.app-bal { position: relative; padding: 9px; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); box-shadow: 0 8px 18px rgb(var(--blue-rgb) / .35); display: flex; flex-direction: column; }
.app-bal small { font-size: .45rem; opacity: .8; text-transform: uppercase; letter-spacing: .08em; }
.app-bal b { font: 700 1rem var(--font-head); font-variant-numeric: tabular-nums; }
.app-add { position: absolute; right: 7px; bottom: 7px; padding: 2px 7px; border-radius: 99px; background: var(--accent-bg); color: #fff; font-size: .45rem; font-weight: 800; }
.app-games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.app-game { display: flex; flex-direction: column; align-items: center; gap: 2px; animation: appPop .5s var(--ease-out) both; }
.app-game:nth-child(2) { animation-delay: .1s; } .app-game:nth-child(3) { animation-delay: .2s; } .app-game:nth-child(4) { animation-delay: .3s; }
.app-game img { width: 100%; aspect-ratio: 1; border-radius: 9px; object-fit: cover; background: #141b33; }
.app-game small { font-size: .38rem; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.app-again { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 11px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
.app-again-ic { width: 20px; height: 20px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: rgba(255,122,26,.18); color: #ff7a1a; font-size: .5rem; flex-shrink: 0; }
.app-again-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.app-again-t b { font-size: .52rem; } .app-again-t small { font-size: .42rem; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-again-go { position: relative; padding: 3px 7px; border-radius: 99px; background: var(--blue); font-size: .45rem; font-weight: 800; }
.app-tap { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: rgba(255,255,255,.55); animation: appTap 3s ease-out infinite; }
.app-list { display: flex; flex-direction: column; gap: 5px; }
.app-list-h { font-size: .42rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .5; }
.app-row { position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 7px; border-radius: 10px; background: rgba(255,255,255,.04); overflow: hidden; }
.app-row > i { font-size: .55rem; color: #22c55e; }
.app-row > i.is-go { color: var(--blue-light); }
.app-row b { flex: 1; min-width: 0; font-size: .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-row em { font-style: normal; font-size: .42rem; font-weight: 800; color: var(--blue-light); }
.app-row em.is-ok { color: #22c55e; }
.app-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgb(var(--blue-rgb) / .15); }
.app-prog span { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, transparent, var(--blue-light)); animation: appProg 1.8s ease-in-out infinite; }
@keyframes appProg { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.app-nav { margin-top: auto; display: flex; justify-content: space-around; padding: 7px 4px 12px; border-top: 1px solid rgba(255,255,255,.06); font-size: .55rem; color: rgba(231,236,247,.45); }
.app-nav .is-on { color: var(--blue-light); }
.app-gesture { position: absolute; bottom: 4px; left: 50%; width: 40px; height: 3px; margin-left: -20px; border-radius: 3px; background: rgba(255,255,255,.35); }
.app-sheen { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.12) 45%, transparent 55%); transform: translateX(-120%); animation: appSheen 7s ease-in-out infinite; }
/* Alerts slide down over the app one after another, like Android heads-up notifications. */
.app-hu { position: absolute; left: 6px; right: 6px; top: 20px; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 6px 7px; border-radius: 12px;
  background: rgba(20,27,51,.92); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 8px 20px rgba(0,0,0,.45); backdrop-filter: blur(8px);
  transform: translateY(-140%); opacity: 0; animation: appHu 9s var(--ease-out) infinite; }
.app-hu.is-2 { animation-delay: 3s; } .app-hu.is-3 { animation-delay: 6s; }
.app-hu > i { width: 20px; height: 20px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: .5rem; flex-shrink: 0; background: rgba(34,197,94,.18); color: #22c55e; }
.app-hu.is-2 > i { background: rgb(var(--blue-rgb) / .25); color: var(--blue-light); }
.app-hu.is-3 > i { background: rgba(255,122,26,.2); color: #ff7a1a; }
.app-hu span { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.app-hu b { font-size: .5rem; } .app-hu small { font-size: .42rem; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-hu em { font-style: normal; font-size: .4rem; opacity: .5; align-self: flex-start; }
@media (min-width: 760px) {
  .app-card { grid-template-columns: 1fr 250px; align-items: center; padding: 22px 26px; }
  .app-visual { order: 0; height: 430px; margin: -22px -26px -22px 0; padding-top: 0; align-items: center; -webkit-mask-image: none; mask-image: none; }
  .app-glow { top: 50%; margin-top: -130px; }
  .app-orbit { top: 50%; }
  .app-phone { width: 170px; }
}
@keyframes appFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes appGlow { 0%, 100% { opacity: .75; scale: 1; } 50% { opacity: 1; scale: 1.08; } }
@keyframes appSpin { to { rotate: 360deg; } }
@keyframes appHu { 0% { transform: translateY(-140%); opacity: 0; } 4%, 28% { transform: none; opacity: 1; } 33%, 100% { transform: translateY(-140%); opacity: 0; } }
@keyframes appBell { 0%, 6%, 100% { rotate: 0deg; } 1% { rotate: 14deg; } 2% { rotate: -12deg; } 3% { rotate: 9deg; } 4% { rotate: -6deg; } 5% { rotate: 3deg; } }
@keyframes appTap { 0%, 55% { transform: scale(0); opacity: 0; } 60% { transform: scale(.4); opacity: .9; } 85%, 100% { transform: scale(2.2); opacity: 0; } }
@keyframes appSheen { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes appPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .app-phone, .app-glow, .app-orbit, .app-bell, .app-tap, .app-sheen, .app-game, .app-prog span { animation: none; }
  .app-tilt { transform: none; opacity: 1; transition: none; }
  .app-hu { animation: none; } .app-hu.is-1 { transform: none; opacity: 1; }
}

/* Newsletter card (includes/subscribe-widget.php) */
.sw-card { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center; padding: 16px; border-radius: 18px; background: var(--bg-raised); border: 1px solid var(--border-md); }
.sw-ic { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--accent-dim); color: var(--accent); font-size: 1.05rem; }
.sw-title { font-size: 1.05rem; font-weight: 700; }
.sw-desc { margin-top: 2px; font-size: var(--fs-sm); color: var(--text-sub); }
.sw-flash { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 10px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 700; }
.sw-flash.is-ok { background: rgba(34,197,94,.14); color: var(--pos); }
.sw-flash.is-info { background: var(--blue-dim); color: var(--blue-light); }
.sw-flash.is-warn { background: rgba(245,158,11,.14); color: var(--warn-fg); }
.sw-act { grid-column: 1 / -1; }
.sw-act form { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.sw-btn { height: 42px; }
.sw-as { font-size: var(--fs-xs); color: var(--text-muted); overflow-wrap: anywhere; }
.sw-done { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sw-done-tag { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-full); background: rgba(34,197,94,.14); color: var(--pos); font-size: var(--fs-sm); font-weight: 700; }
.sw-unsub { background: none; border: 0; padding: 0; color: var(--text-muted); font-weight: 600; font-size: var(--fs-xs); font-family: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.sw-unsub:hover { color: var(--neg); }
.sw-guest input { flex: 1; min-width: 180px; height: 42px; padding: 0 14px; border-radius: 12px; background: var(--bg-float); border: 1px solid var(--border-md); color: var(--text); font-weight: 500; font-size: 1rem; font-family: inherit; outline: none; transition: border-color var(--dur-2), box-shadow var(--dur-2); }
.sw-guest input:focus { border-color: rgb(var(--blue-rgb) / .6); box-shadow: 0 0 0 3px rgb(var(--blue-rgb) / .14); }
.sw-guest input.is-bad { border-color: var(--neg); animation: swShake .3s; }
@keyframes swShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
/* The meme switch: the yelling women slide over to Smudge the cat. */
.sw-act { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sw-switch { display: flex; flex-direction: column; align-items: center; gap: 6px; }
#sw-cb { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
#sw-cb:focus-visible + #sw-btn { outline: 2px solid var(--ring); outline-offset: 4px; }
#sw-btn {
  position: relative; display: block; width: 176px; height: 80px; border-radius: 80px; cursor: pointer; touch-action: pan-y;
  background: linear-gradient(145deg, #4b5563, #2b3240); user-select: none; -webkit-user-select: none;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.45), 0 8px 20px rgba(0,0,0,.3);
  transition: background .35s ease, box-shadow .35s ease;
}
#sw-knob {
  position: absolute; top: 8px; left: 8px; z-index: 2; width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  background: #1b2236 url(../images/smudge.jpg) 0 0 / 134px auto no-repeat;
  box-shadow: 0 4px 12px rgba(0,0,0,.45), 0 0 0 3px rgba(255,255,255,.12);
  transition: left .45s cubic-bezier(.34,1.56,.64,1), background-position .45s var(--ease-out);
  animation: swNudge 4s ease-in-out 2s infinite;
}
.sw-sub-txt, .sw-ok-txt { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font: 800 .82rem var(--font-head); letter-spacing: .02em; white-space: nowrap; pointer-events: none; transition: opacity .3s; }
.sw-sub-txt { right: 16px; }
.sw-ok-txt { left: 18px; opacity: 0; }
#sw-cb:checked + #sw-btn { background: linear-gradient(145deg, var(--blue), var(--blue-dark)); box-shadow: inset 0 2px 8px rgba(0,0,0,.3), 0 8px 24px rgb(var(--blue-rgb) / .4); }
#sw-cb:checked + #sw-btn #sw-knob { left: 104px; background-position: -67px 0; animation: none; }
#sw-cb:checked + #sw-btn .sw-sub-txt { opacity: 0; }
#sw-cb:checked + #sw-btn .sw-ok-txt { opacity: 1; }
#sw-btn.pop #sw-knob { animation: swPop .45s var(--ease-out); }
.sw-hint { font-size: var(--fs-xs); font-weight: 700; color: var(--text-sub); transition: color .3s; }
.sw-hint.on { color: var(--pos); }
/* The form waits behind the switch, except once subscribed (Unsubscribe stays in reach). */
.sw-open { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .4s var(--ease-out), opacity .3s; width: 100%; }
.sw-open > * { min-height: 0; overflow: hidden; }
.sw-act.is-on .sw-open, .sw-act.is-sub .sw-open { grid-template-rows: 1fr; opacity: 1; }
.sw-open form, .sw-done { justify-content: center; padding: 2px; }
@keyframes swNudge { 0%, 86%, 100% { transform: none; } 90% { transform: translateX(10px) rotate(8deg); } 94% { transform: translateX(-3px); } }
@keyframes swPop { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { #sw-knob { animation: none; transition: none; } #sw-btn.pop #sw-knob { animation: none; } }
@media (min-width: 760px) {
  .sw-card { grid-template-columns: auto 1fr auto; padding: 18px 22px; } .sw-act { grid-column: auto; min-width: 280px; }
}
