/* Frontend theme shell */
:root {
  --font-main: Outfit, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-soft: #f1f5f9;
  --color-surface-muted: #e0f2fe;
  --color-text: #334155;
  --color-text-muted: #64748b;
  --color-text-soft: #94a3b8;
  --color-heading: #0f172a;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-soft: #dbeafe;
  --color-accent: #0284c7;
  --color-accent-soft: #e0f2fe;
  --color-success: #16a34a;
  --color-success-soft: #ecfdf5;
  --color-warning: #d97706;
  --color-warning-soft: #fff7ed;
  --color-error: #dc2626;
  --color-error-soft: #fef2f2;
  --color-info: #0369a1;
  --color-info-soft: #e0f2fe;
  --color-border: #dbe4ef;
  --color-divider: #e2e8f0;
  --color-focus: rgba(37, 99, 235, .28);
  --container: 1180px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow-soft: 0 12px 32px rgba(15, 23, 42, .08);
  --shadow-card: 0 8px 22px rgba(15, 23, 42, .06);
  --shadow-navbar: 0 2px 14px rgba(15, 23, 42, .06);
}
html { background: #f8fafc; }
body.site-page, body.ptc-view-body {
  min-height: 100vh;
  color: #334155;
  background:
    radial-gradient(circle at 12% -10%, rgba(59,130,246,.18), transparent 28rem),
    radial-gradient(circle at 90% 6%, rgba(14,165,233,.14), transparent 26rem),
    #f8fafc;
}
body.site-page.dark { background:#0f172a; }
.skip-link { background:#0f172a; color:#fff; }
.app-shell { min-height: 100vh; display:flex; flex-direction:column; }
.app-topbar {
  position: sticky; top:0; z-index:50;
  border-bottom:1px solid var(--color-divider);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-navbar);
}
.app-topbar-inner, .app-announcement-inner, .app-main, .container, .hero {
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
}
.app-topbar-inner { min-height:58px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.brand.app-brand { gap:10px; font-size: clamp(1.05rem, 2vw, 1.28rem); font-weight: 300; color:#003d66; letter-spacing:-.03em; min-width:0; }
.brand.app-brand img {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: block;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.brand.app-brand span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* Logo images should stay fully visible in both public and legal header/footer. */
.brand.app-brand > img,
.site-legal-page .brand.app-brand > img,
.app-footer-logo,
.site-legal-page .app-footer-logo {
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.app-top-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.app-mini-link { color:#64748b; font-size:.88rem; font-weight:500; }
.app-mini-link:hover { color:#2563eb; text-decoration:none; }
.app-theme-dot { width:34px; height:34px; display:grid; place-items:center; border:0; border-radius:999px; background:#f1f5f9; color:#64748b; }
.app-announcement { border-bottom:1px solid #bfdbfe; background:#eff6ff; }
.app-announcement-inner { display:flex; align-items:center; justify-content:center; gap:12px; min-height:44px; padding:8px 0; text-align:center; color:#075985; }
.app-badge { display:inline-flex; align-items:center; justify-content:center; border-radius:6px; background:#2563eb; color:#fff; padding:4px 8px; font-size:.68rem; line-height:1; font-weight:800; text-transform:uppercase; letter-spacing:.04em; box-shadow:0 4px 10px rgba(37,99,235,.18); white-space:nowrap; }
.app-announcement p { margin:0; font-size:.9rem; }
.app-announcement strong { color:#0c4a6e; }
.app-announcement a { font-size:.86rem; font-weight:700; white-space:nowrap; }
.app-main { flex:1; padding:30px 0 38px; position:relative; }
.app-layout { display:grid; grid-template-columns:minmax(0, 1fr); gap:22px; position:relative; }
.app-side-ad { position:fixed; top:50%; transform:translateY(-50%); width:160px; min-height:600px; display:grid; place-items:center; border:2px dashed #cbd5e1; border-radius:12px; background:rgba(241,245,249,.75); color:#94a3b8; font-size:.82rem; text-align:center; z-index:0; overflow:hidden; }
.app-side-ad.left { left:max(18px, calc((100vw - var(--container)) / 2 - 190px)); }
.app-side-ad.right { right:max(18px, calc((100vw - var(--container)) / 2 - 190px)); }
.app-side-ad.has-ad { border:0; background:transparent; }
.app-top-ad, .app-bottom-ad, .top-banner { min-height:90px; display:grid; place-items:center; border:2px dashed #cbd5e1; border-radius:12px; background:rgba(241,245,249,.72); color:#94a3b8; overflow:hidden; }
.app-top-ad:empty::before { content:'[Ad Space: 728x90 Banner]'; }
.app-bottom-ad:empty::before { content:'[Ad Space: 728x90 Banner Bottom]'; }
.app-hero-card {
  width:100%; max-width:var(--container); margin:0 auto;
  background: rgba(255,255,255,.96);
  border:1px solid #dbe4ef;
  border-radius:18px;
  box-shadow: var(--shadow-soft);
  padding: clamp(20px, 3vw, 32px);
}
.app-kicker { margin:0 0 6px; text-align:center; color:#64748b; font-size:.82rem; font-weight:800; text-transform:uppercase; letter-spacing:.12em; }
.app-hero-card h1 { margin:0 auto 10px; max-width:900px; text-align:center; color:#475569; font-size:clamp(1.18rem, 2.2vw, 1.45rem); font-weight:300; line-height:1.65; letter-spacing:-.02em; }
.app-hero-card h1 strong { color:#0f172a; font-weight:800; }
.app-info-alert { margin:18px 0; display:flex; gap:10px; align-items:center; justify-content:center; color:#1e40af; background:#eff6ff; border:1px solid #bfdbfe; border-radius:10px; padding:12px 14px; font-size:.94rem; text-align:center; }
.app-coin-grid { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px; margin:18px 0; }
.app-coin-button { display:flex; align-items:center; justify-content:center; gap:9px; min-height:46px; padding:9px 10px; border:1px solid #dbe4ef; border-radius:14px; background:#fff; color:#0f172a; font-weight:800; box-shadow:0 6px 16px rgba(15,23,42,.04); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.app-coin-button:hover, .app-coin-button.active { transform:translateY(-1px); border-color:#93c5fd; background:#eff6ff; text-decoration:none; box-shadow:0 10px 22px rgba(37,99,235,.12); color:#1d4ed8; }
.app-coin-button img, .app-coin-button svg { width:21px; height:21px; flex:0 0 auto; fill:currentColor; }
.app-claim-box { margin:14px 0 18px; background:#d9edf7; border:1px solid #bce8f1; color:#31708f; border-radius:7px; padding:15px; text-align:center; font-size:.96rem; }
.app-claim-box strong { color:#134e6f; }
.app-claim-box div + div { margin-top:5px; }
.account-strip { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:10px; padding:0; margin:18px 0 0; background:transparent; box-shadow:none; border:0; }
.account-metric { min-width:0; background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:14px; box-shadow:0 6px 14px rgba(15,23,42,.04); }
.account-metric span { display:block; color:#64748b; font-size:.74rem; text-transform:uppercase; font-weight:800; letter-spacing:.06em; }
.account-metric strong { display:block; margin-top:3px; color:#0f172a; font-size:1rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-metric small { display:block; margin-top:2px; color:#94a3b8; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.withdraw-strip-btn { grid-column:1 / -1; min-height:48px; justify-self:stretch; }
.app-page-nav-wrap { width:100%; max-width:var(--container); margin:22px auto 0; }
.app-page-nav, .tabs { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; padding:0; border:0; background:transparent; box-shadow:none; }
.app-page-nav a, .tabs button { display:inline-flex; align-items:center; gap:6px; min-height:38px; border:1px solid #dbe4ef; border-radius:999px; padding:8px 13px; background:#fff; color:#475569; font-size:.88rem; font-weight:800; box-shadow:0 5px 14px rgba(15,23,42,.04); transition:.15s ease; }
.app-page-nav a:hover, .tabs button:hover { color:#1d4ed8; border-color:#93c5fd; background:#eff6ff; text-decoration:none; }
.app-page-nav a.active, .tabs button.active { background:#2563eb; border-color:#2563eb; color:#fff; box-shadow:0 10px 22px rgba(37,99,235,.22); }
.app-page-nav a.active strong, .tabs button.active strong { color:#fff; }
.tab-bonus-badge, .tab-badge { display:inline-flex; align-items:center; justify-content:center; min-width:18px; min-height:18px; padding:2px 6px; border-radius:999px; background:#e0f2fe; color:#0369a1; font-size:.68rem; font-weight:900; }
.tabs button.active .tab-bonus-badge, .tabs button.active .tab-badge, .app-page-nav a.active .tab-badge { background:rgba(255,255,255,.2); color:#fff; }
.tab-badge:empty { display:none; }
.tab-badge.dot:empty, .tab-badge.dot { display:inline-block; min-width:9px; width:9px; height:9px; padding:0; background:#f97316; }
.notice, .bonus-banner { border-radius:12px; border:1px solid #bfdbfe; background:#eff6ff; color:#1e40af; padding:12px 14px; margin:0 0 14px; }
.notice.error, .error-state, .bonus-banner.error-state { border-color:#fecaca; background:#fef2f2; color:#991b1b; }
.panel { width:100%; max-width:var(--container); margin:0 auto; background:#fff; border:1px solid #dbe4ef; border-radius:18px; box-shadow:var(--shadow-soft); padding: clamp(18px, 2.6vw, 28px); }
.section-title { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.section-title h2 { color:#0f172a; font-size:clamp(1.28rem, 2vw, 1.7rem); }
.section-title p { color:#64748b; margin:0; }
.section-title.compact { margin-bottom:12px; }
.grid { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:14px; align-items:stretch; }
.card { border:1px solid #e2e8f0; border-radius:14px; background:#fff; padding:18px; box-shadow:0 8px 18px rgba(15,23,42,.04); }
.card h3 { color:#0f172a; font-size:1.02rem; }
.offer-card-title { display:flex; align-items:center; gap:9px; }
.offer-icon { width:30px; height:30px; border-radius:10px; display:inline-grid; place-items:center; flex:0 0 auto; background:#eff6ff; color:#2563eb; }
.offer-icon svg { width:18px; height:18px; fill:currentColor; }
.offer-card { display:flex; flex-direction:column; gap:8px; height:100%; min-height:230px; }
.offer-reward { margin-top:auto; }
.reward { color:#2563eb; font-weight:900; }
.btn { min-height:40px; border-radius:10px; padding:9px 14px; font-weight:900; border:1px solid transparent; cursor:pointer; }
.btn.primary { background:#007bff; color:#fff; border-color:#007bff; box-shadow:0 8px 18px rgba(0,123,255,.18); }
.btn.primary:hover { background:#0069d9; border-color:#0069d9; text-decoration:none; }
.btn.ghost { background:#fff; border-color:#dbe4ef; color:#334155; }
.btn.ghost:hover, .btn.ghost.active { border-color:#93c5fd; background:#eff6ff; color:#1d4ed8; text-decoration:none; }
.empty-state, .loading { text-align:center; border:1px dashed #cbd5e1; border-radius:14px; background:#f8fafc; color:#64748b; padding:28px; }
.table-scroll { overflow-x:auto; border:1px solid #e2e8f0; border-radius:12px; }
table { width:100%; border-collapse:collapse; background:#fff; }
th, td { padding:12px 14px; border-bottom:1px solid #e2e8f0; text-align:left; vertical-align:top; }
th { background:#f8fafc; color:#475569; font-size:.78rem; text-transform:uppercase; letter-spacing:.06em; }
tr:last-child td { border-bottom:0; }
input, select, textarea { border:1px solid #cbd5e1; border-radius:10px; background:#fff; color:#0f172a; min-height:44px; padding:10px 12px; }
textarea { min-height:100px; }
input:focus, select:focus, textarea:focus { border-color:#60a5fa; box-shadow:0 0 0 4px rgba(59,130,246,.15); outline:none; }
dialog { border:0; border-radius:18px; padding:0; box-shadow:0 30px 80px rgba(15,23,42,.32); }
dialog::backdrop { background:rgba(15,23,42,.54); backdrop-filter:blur(4px); }
.dialog-card { max-width:460px; padding:26px; background:#fff; border-radius:18px; }
.dialog-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:flex-end; }
.app-recent { width:100%; max-width:var(--container); margin:22px auto 0; background:#fff; border:1px solid #dbe4ef; border-radius:18px; box-shadow:var(--shadow-card); overflow:hidden; }
.app-recent-head { display:flex; align-items:center; justify-content:center; gap:8px; padding:14px 16px; background:#eff6ff; border-bottom:1px solid #bfdbfe; }
.app-recent-head h2 { margin:0; color:#0c4a6e; font-size:1.1rem; letter-spacing:-.02em; }
.app-recent .table-scroll { border:0; border-radius:0; }
.app-user-mask { font-family:var(--font-mono); font-size:.86rem; color:#334155; }
.app-footer { margin-top:auto; background:#fff; border-top:1px solid #e2e8f0; }
.app-footer-inner { width:min(var(--container), calc(100% - 32px)); margin:0 auto; padding:24px 0; text-align:center; color:#64748b; font-size:.9rem; }
.app-footer a { margin:0 7px; font-weight:700; }
.history-feed { display:grid; gap:12px; }
.history-item { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; border:1px solid #e2e8f0; border-radius:14px; background:#fff; padding:14px; }
.history-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:999px; background:#eff6ff; color:#2563eb; font-weight:900; }
.history-amount { font-weight:900; color:#0f172a; }
.status-pill { display:inline-flex; align-items:center; justify-content:center; border-radius:999px; background:#eff6ff; color:#1d4ed8; padding:4px 9px; font-size:.75rem; font-weight:900; }
.progress { height:9px; border-radius:999px; background:#e2e8f0; overflow:hidden; }
.progress span { display:block; height:100%; background:#2563eb; border-radius:inherit; }
.leaderboard-list { display:grid; gap:10px; }
.leaderboard-row { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; border:1px solid #e2e8f0; border-radius:14px; padding:12px; }
.leaderboard-rank { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:#eff6ff; color:#1d4ed8; font-weight:900; }
.leaderboard-row-main { display:flex; flex-direction:column; gap:2px; min-width:0; }
.leaderboard-row-side { text-align:right; display:flex; flex-direction:column; gap:2px; }
.leaderboard-meta { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
.leaderboard-meta span { border:1px solid #e2e8f0; background:#f8fafc; border-radius:999px; padding:6px 10px; font-size:.82rem; }
iframe { width:100%; min-height:680px; border:1px solid #e2e8f0; border-radius:14px; background:#fff; }
.monetization-slot.has-ad { border:0; background:transparent; }
.monetization-slot.has-ad iframe { min-height:0; border:0; border-radius:0; }
.mobile-ad { display:none; }
/* PTC viewer refresh */
.ptc-topbar { background:rgba(255,255,255,.95); border-bottom:1px solid #e2e8f0; box-shadow:var(--shadow-navbar); }
.ptc-brand { color:#003d66; }
.ptc-brand-icon { width:32px; height:32px; border-radius:10px; }
.ptc-mini-stat, .ptc-status-chip { border:1px solid #dbe4ef; background:#fff; border-radius:999px; }
.ptc-frame-stage { background:#e2e8f0; }
.ptc-window-panel { margin-top:24px; }
@media (max-width: 1460px) { .app-side-ad { display:none; } }
@media (max-width: 1080px) {
  .grid { grid-template-columns:repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app-topbar-inner { align-items:flex-start; flex-direction:column; padding:12px 0; }
  .app-top-actions { width:100%; justify-content:flex-start; flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; scrollbar-width:none; padding:2px 0 7px; scroll-snap-type:x proximity; }
  .app-top-actions::-webkit-scrollbar { display:none; }
  .app-mini-link { flex:0 0 auto; scroll-snap-align:start; border:1px solid #dbe4ef; border-radius:999px; background:#fff; padding:7px 10px; box-shadow:0 5px 13px rgba(15,23,42,.04); }
  .app-theme-dot, .app-top-actions .btn { flex:0 0 auto; }
  .app-announcement-inner { align-items:flex-start; flex-direction:column; text-align:left; }
  .app-coin-grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .account-strip { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .section-title { flex-direction:column; }
  .panel, .app-hero-card, .app-recent { border-radius:14px; }
  .desktop-ad { display:none; }
  .mobile-ad { display:grid; }
}
@media (max-width: 720px) {
  .app-page-nav-wrap { margin-top:16px; padding:8px; border:1px solid #dbe4ef; border-radius:16px; background:rgba(255,255,255,.84); box-shadow:0 8px 20px rgba(15,23,42,.05); overflow:hidden; position:relative; }
  .app-page-nav-wrap::before, .app-page-nav-wrap::after { content:''; position:absolute; top:8px; bottom:8px; width:24px; pointer-events:none; z-index:2; }
  .app-page-nav-wrap::before { left:8px; background:linear-gradient(90deg, rgba(255,255,255,.94), rgba(255,255,255,0)); }
  .app-page-nav-wrap::after { right:8px; background:linear-gradient(270deg, rgba(255,255,255,.94), rgba(255,255,255,0)); }
  .app-page-nav, .tabs { justify-content:flex-start; flex-wrap:nowrap; gap:7px; overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; scrollbar-width:none; scroll-snap-type:x proximity; padding:2px 10px 8px; margin:0; }
  .app-page-nav::-webkit-scrollbar, .tabs::-webkit-scrollbar { display:none; }
  .app-page-nav a, .tabs button { flex:0 0 auto; min-height:36px; padding:7px 10px; white-space:nowrap; font-size:.78rem; scroll-snap-align:center; box-shadow:0 5px 14px rgba(15,23,42,.05); }
  .tabs button.active, .app-page-nav a.active { box-shadow:0 8px 18px rgba(37,99,235,.24); }
  .tab-bonus-badge, .tab-badge { min-width:16px; min-height:16px; padding:1px 5px; font-size:.62rem; }
}
@media (max-width: 520px) {
  .app-topbar-inner, .app-announcement-inner, .app-main, .container, .hero, .app-footer-inner { width:min(100% - 22px, var(--container)); }
  .app-coin-grid, .account-strip, .grid { grid-template-columns:1fr; }
  .app-page-nav-wrap { width:min(100% - 22px, var(--container)); }
  .app-page-nav a, .tabs button { font-size:.76rem; padding:7px 9px; }
  th, td { padding:10px; }
  .history-item, .leaderboard-row { grid-template-columns:1fr; }
  .leaderboard-row-side { text-align:left; }
}

/* Legal/post page shell: keep standalone pages on the same Design 15 theme as the main site. */
nav.app-topbar {
  display: block;
  min-height: 0;
  padding: 0;
}
.site-legal-page .app-main {
  flex: 1;
}
.app-legal-main {
  display: grid;
  align-items: start;
  padding-top: clamp(24px, 4vw, 42px);
  padding-bottom: clamp(34px, 6vw, 64px);
}
.app-post-article {
  max-width: min(920px, 100%);
  overflow: hidden;
}
.app-post-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: #64748b;
  font-size: .88rem;
  font-weight: 700;
}
.app-post-breadcrumb a {
  color: #2563eb;
}
.app-post-article .app-kicker {
  text-align: left;
  margin-bottom: 10px;
  color: #2563eb;
}
.app-post-article h1 {
  margin-bottom: 10px;
  color: #0f172a;
  font-size: clamp(1.9rem, 4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.app-post-meta {
  margin: 0 0 20px;
  color: #64748b;
  font-size: .92rem;
  font-weight: 700;
}
.app-post-content {
  color: #334155;
  font-size: clamp(1rem, 1.3vw, 1.08rem);
  line-height: 1.8;
}
.app-post-content p,
.app-post-content div {
  margin-bottom: 16px;
}
.app-post-content a {
  font-weight: 800;
}
.app-post-content ul,
.app-post-content ol {
  padding-left: 1.35rem;
}
.app-post-content li + li {
  margin-top: 8px;
}
.app-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}
.app-legal-footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 0;
  flex-wrap: wrap;
}
.app-footer-separator {
  margin: 0 8px;
  color: #cbd5e1;
}
@media (max-width: 860px) {
  .site-legal-page .app-top-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
@media (max-width: 520px) {
  .app-legal-main {
    padding-top: 22px;
  }
  .app-post-article {
    padding: 18px;
  }
  .app-post-actions .btn {
    width: 100%;
  }
  .app-footer-separator {
    display: none;
  }
}


/* Production responsive fixes: hamburger header, no horizontal bleed, stronger footer, and safer legal content layout. */
html, body.site-page { overflow-x: hidden; }
.app-topbar-inner { position: relative; }
.app-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 6px 16px rgba(15,23,42,.06);
  cursor: pointer;
}
.app-nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}
.app-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.app-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.app-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.app-nav-divider { width: 1px; height: 24px; background: #e2e8f0; }
.app-contact-link { color: #2563eb; }
.app-footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 14px 24px;
  text-align: left;
}
.app-footer-brand { display: grid; gap: 4px; min-width: 0; }
.app-footer-brand strong { color: #0f172a; font-size: .92rem; }
.app-footer-brand span { color: #64748b; font-size: .86rem; }
.app-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 12px; min-width: 0; }
.app-footer-links a {
  margin: 0;
  padding: 5px 0;
  white-space: nowrap;
  color: #2563eb;
  font-weight: 800;
}
.app-post-content h2 { margin: 24px 0 10px; color:#0f172a; font-size: clamp(1.35rem, 2vw, 1.75rem); }
.app-post-content h3 { margin: 18px 0 8px; color:#0f172a; font-size: 1.12rem; }
.app-post-content p { margin: 0 0 14px; }
.app-post-content ul { margin: 0 0 18px; padding-left: 1.25rem; }
.app-post-content li { margin: 0 0 8px; }
.offer-card .muted { overflow-wrap: anywhere; }
.offer-card-title h3 { overflow-wrap: anywhere; }
.offer-card .btn { width: 100%; margin-top: 4px; text-align: center; }
@media (min-width: 1181px) {
  .offer-card { min-height: 240px; }
}
@media (max-width: 980px) {
  .app-footer-inner { grid-template-columns: 1fr; text-align: center; }
  .app-footer-links { justify-content: center; }
}
@media (max-width: 860px) {
  .app-topbar-inner { flex-direction: row; align-items: center; padding: 10px 0; }
  .app-nav-toggle { display: inline-flex; margin-left: auto; }
  .app-top-actions {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 70;
    width: 100%;
    max-height: min(72vh, 520px);
    overflow: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 46px rgba(15,23,42,.18);
    backdrop-filter: blur(16px);
  }
  .app-top-actions.is-open { display: grid; }
  .app-mini-link, .app-top-actions .btn, .app-theme-dot {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }
  .app-theme-dot { display: none; }
  .app-nav-divider { display: none; }
  .app-announcement-inner { padding: 10px 0; }
}
@media (max-width: 520px) {
  .brand.app-brand { max-width: calc(100vw - 90px); }
  .app-top-actions { grid-template-columns: 1fr; }
  .app-footer-links { display: grid; grid-template-columns: 1fr; gap: 3px; }
  .app-footer-links a { white-space: normal; overflow-wrap: anywhere; }
}
/* FO12 contact/link visibility refinements */
.app-contact-link {
  color: #1d4ed8 !important;
  background: #eff6ff;
  border-color: #bfdbfe !important;
  font-weight: 900;
}
.app-contact-link:hover,
.app-contact-link:focus-visible {
  color: #0f172a !important;
  background: #dbeafe;
  text-decoration: none;
}
.app-footer-links a[href^="mailto:"],
.app-footer-links a[href*="t.me/"] {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 10px;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .08);
}
.app-footer-links a[href^="mailto:"]:hover,
.app-footer-links a[href*="t.me/"]:hover {
  color: #0f172a;
  background: #dbeafe;
  border-color: #93c5fd;
}
.app-inline-contact {
  color: #1d4ed8;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.app-inline-contact:hover,
.app-inline-contact:focus-visible {
  color: #0f172a;
  background: #eff6ff;
  border-radius: 6px;
}

/* Final FO12 footer: compact brand/contact row + legal row, matching the site color scheme. */
.app-footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid #dbeafe;
}
.app-footer-inner {
  width: min(var(--container), calc(100% - 24px));
  margin: 0 auto;
  padding: 12px 0 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  text-align: left;
  color: #64748b;
  font-size: .86rem;
}
.app-footer a {
  margin: 0;
  text-decoration: none;
}
.app-footer-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dbeafe;
}
.app-footer-brand-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.app-footer-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: block;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.app-footer-brand-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.app-footer-brand-copy strong {
  flex: 0 0 auto;
  color: #0f172a;
  font-size: .98rem;
  font-weight: 950;
  line-height: 1.15;
  white-space: nowrap;
}
.app-footer-brand-copy span {
  min-width: 0;
  max-width: 690px;
  color: #475569;
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-footer-contact-row {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 48%;
}
.app-footer-contact-row a,
.app-footer-legal-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  color: #075985;
  background: #f8fbff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.2;
  box-shadow: 0 5px 14px rgba(37, 99, 235, .07);
}
.app-footer-contact-row a {
  gap: 5px;
  padding: 6px 12px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.app-footer-legal-row a {
  padding: 6px 12px;
  white-space: nowrap;
}
.app-footer-contact-row a:hover,
.app-footer-contact-row a:focus-visible,
.app-footer-legal-row a:hover,
.app-footer-legal-row a:focus-visible {
  color: #0f172a;
  background: #dbeafe;
  border-color: #93c5fd;
  text-decoration: none;
}
.app-footer-legal-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 7px;
  width: 100%;
}
.app-footer-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.35;
}
.app-inline-contact {
  color: #1d4ed8;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.app-inline-contact:hover,
.app-inline-contact:focus-visible {
  color: #0f172a;
  background: #eff6ff;
  border-radius: 6px;
}
@media (max-width: 980px) {
  .app-footer-main-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .app-footer-contact-row {
    justify-content: flex-start;
    max-width: 100%;
  }
  .app-footer-brand-copy {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 3px 10px;
  }
  .app-footer-brand-copy span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}
@media (max-width: 560px) {
  .app-footer-inner {
    width: min(100% - 20px, var(--container));
    padding: 12px 0 14px;
    gap: 10px;
  }

  .app-footer-main-row {
    align-items: stretch;
  }

  .app-footer-brand-row {
    align-items: flex-start;
  }

  .app-footer-brand-copy {
    display: grid;
    gap: 3px;
  }

  .app-footer-contact-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .app-footer-contact-row a {
    width: 100%;
    text-align: center;
  }

  .app-footer-legal-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .app-footer-legal-row a {
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .app-footer-meta-row {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
  }

  .app-footer-meta-row span {
    width: 100%;
    display: block;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .app-footer-legal-row {
    grid-template-columns: 1fr;
  }
}

/* 2026-06-30 refinements: hide empty ad slots, fixed summary grids, admin sync, and login ad wall. */
.monetization-slot:not(.has-ad),
.app-side-ad:not(.has-ad),
.app-top-ad:not(.has-ad),
.app-bottom-ad:not(.has-ad),
.top-banner:not(.has-ad) {
  display: none !important;
  min-height: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}
.app-top-ad::before,
.app-bottom-ad::before,
.top-banner::before { content: none !important; }
.monetization-slot.has-ad,
.app-top-ad.has-ad,
.app-bottom-ad.has-ad,
.top-banner.has-ad {
  display: grid !important;
  place-items: center;
  width: 100% !important;
  height: auto !important;
  margin: 12px 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.app-side-ad.has-ad {
  display: grid !important;
  width: 160px !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
@media (max-width: 860px) {
  .desktop-ad.has-ad { display: none !important; }
  .mobile-ad.has-ad { display: grid !important; width: 100% !important; }
}
@media (min-width: 861px) {
  .mobile-ad.has-ad { display: none !important; }
}

.history-summary.grid,
.wallet-summary-grid.grid,
.referral-summary-grid.grid,
.advertise-summary-grid.grid {
  width: 100%;
  max-width: none;
  align-items: stretch;
}
.history-summary.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wallet-summary-grid.grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.referral-summary-grid.grid,
.advertise-summary-grid.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.history-summary.grid > .card,
.wallet-summary-grid.grid > .card,
.referral-summary-grid.grid > .card,
.advertise-summary-grid.grid > .card { height: 100%; }
@media (max-width: 860px) {
  .history-summary.grid,
  .wallet-summary-grid.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .referral-summary-grid.grid,
  .advertise-summary-grid.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .history-summary.grid,
  .wallet-summary-grid.grid,
  .referral-summary-grid.grid,
  .advertise-summary-grid.grid { grid-template-columns: 1fr; }
}

body.admin-page {
  min-height: 100vh;
  color: var(--color-text);
  background:
    radial-gradient(circle at 12% -10%, rgba(59,130,246,.18), transparent 28rem),
    radial-gradient(circle at 90% 6%, rgba(14,165,233,.14), transparent 26rem),
    var(--color-bg);
}
body.admin-page .container { padding-top: 18px; }
body.admin-page nav {
  min-height: 58px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-navbar);
  backdrop-filter: blur(14px);
}
body.admin-page nav strong { color: var(--color-heading); }
body.admin-page .panel,
body.admin-page .card {
  border-color: var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}
body.admin-page .tabs {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}
body.admin-page .tabs a,
body.admin-page .tabs button {
  border-color: var(--color-border);
  background: #fff;
  color: var(--color-text);
  box-shadow: 0 5px 14px rgba(15,23,42,.04);
}
body.admin-page .tabs a:hover,
body.admin-page .tabs button:hover,
body.admin-page .tabs a.active,
body.admin-page .tabs button.active {
  border-color: #93c5fd;
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
}
body.admin-page .tabs a.active,
body.admin-page .tabs button.active,
body.admin-page .btn.primary {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37,99,235,.22);
}
body.admin-page .reward { color: var(--color-primary); }
body.admin-page .email-toggle input { accent-color: var(--color-primary) !important; }
@media (max-width: 720px) {
  body.admin-page nav { align-items: stretch; flex-direction: column; }
  body.admin-page nav span { display: flex; flex-wrap: wrap; gap: 8px; }
}

/* 2026-07-03 monetization ad-slot cleanup: show only real ad code, no decorative slot box, clip oversized iframes without page scrolling. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.monetization-slot:not(.has-ad),
.app-side-ad:not(.has-ad),
.app-top-ad:not(.has-ad),
.app-bottom-ad:not(.has-ad),
.top-banner:not(.has-ad) {
  display: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.app-top-ad::before,
.app-bottom-ad::before,
.s15-top-ad::before,
.s15-bottom-ad::before,
.top-banner::before {
  content: none !important;
}

.monetization-slot.has-ad,
.app-side-ad.has-ad,
.app-top-ad.has-ad,
.app-bottom-ad.has-ad,
.s15-side-ad.has-ad,
.s15-top-ad.has-ad,
.s15-bottom-ad.has-ad,
.top-banner.has-ad {
  justify-content: center;
  align-items: flex-start;
  max-width: 100%;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  overflow: hidden !important;
  text-align: center;
}

.app-side-ad.has-ad,
.s15-side-ad.has-ad {
  width: auto !important;
}

.monetization-slot.has-ad > * {
  flex: 0 0 auto;
}

.monetization-slot.has-ad iframe,
.monetization-slot.has-ad img,
.monetization-slot.has-ad object,
.monetization-slot.has-ad embed,
.monetization-slot.has-ad ins,
.monetization-slot.has-ad a {
  max-width: none;
}

.monetization-slot.has-ad iframe {
  border: 0;
  background: none;
  border: none;
  min-height: 0;
  min-width: 0;
  box-shadow: none;
  border-radius: 0;
}

@media (max-width: 860px) {
  .desktop-ad.has-ad { display: none !important; }
  .mobile-ad.has-ad { display: flex !important; }
}
@media (min-width: 861px) {
  .mobile-ad.has-ad { display: none !important; }
}


/* 2026-07-15: initial-scale mobile rendering keeps the full desktop navigation visible. */
.app-nav-toggle{display:none!important}
@media(max-width:860px){
.app-topbar-inner{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 12px;padding:8px 0}
.app-top-actions,.app-top-actions.is-open{display:flex!important;position:static!important;width:auto!important;max-height:none!important;overflow:visible!important;grid-template-columns:none!important;gap:8px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;flex:1 1 100%;justify-content:center;flex-wrap:wrap}
.app-mini-link,.app-top-actions .btn{width:auto!important;min-height:34px!important;justify-content:center}
.app-theme-dot{display:grid!important;width:34px!important;min-height:34px!important}
.app-nav-divider{display:block}
}
@media(max-width:520px){.brand.app-brand{max-width:none}.app-top-actions{flex-wrap:wrap}}
