/* ════════════════════════════════════════════════════════════
   Content + widgets — ad slots, SEO sections, breadcrumbs,
   feedback button, online counter, try-other rail.
   Loaded after app.css.
   ════════════════════════════════════════════════════════════ */

/* ── Ad slots (CLS-safe reserved space, labeled) ────────── */
.ad-slot {
  position: relative;
  display: block;          /* block so <ins> inherits full width */
  background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 10px, transparent 10px, transparent 20px);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  color: var(--ink-3);
  overflow: hidden;
}
/* Label is absolutely centred — doesn't affect <ins> layout or width */
.ad-slot::before {
  content: "Advertisement";
  font-family: var(--font-ui); font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
  opacity: .7;
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 0;
}
/* <ins> fills the full slot width so AdSense can measure availableWidth */
.ad-slot ins.adsbygoogle {
  display: block !important;
  width: 100%; height: 100%;
  position: relative; z-index: 1;
}
.ad-slot--top { width: 100%; max-width: 728px; height: 90px; margin: 0 auto var(--sp-5); }
.ad-slot--mid { width: 100%; max-width: 970px; height: 110px; margin: var(--sp-6) auto; }
.ad-slot--sidebar { width: 100%; height: 250px; }
.ad-slot--win { width: 100%; height: 100px; margin: 0 0 var(--sp-4); }
.ad-slot--rail { width: 100%; max-width: 336px; height: 280px; margin: var(--sp-6) auto; }
/* device visibility flags (mirror admin JSON) */
.ad-hide-mobile { display: none; }
@media (min-width: 700px) { .ad-hide-mobile { display: flex; } .ad-only-mobile { display: none; } }
/* ad-show-* classes output by render_ad_slot() */
.ad-slot--empty { background: none !important; border: none !important; height: 0 !important; min-height: 0 !important; margin: 0 !important; overflow: hidden; }
.ad-slot--empty::before { display: none; }
/* When admin marks specific device visibility (all default-on unless show_* missing) */
@media (max-width: 699px) { .ad-slot:not(.ad-show-mobile):not(.ad-hide-mobile) { display: none !important; } }
@media (min-width: 700px) and (max-width: 1023px) { .ad-slot:not(.ad-show-tablet) { display: none !important; } }
@media (min-width: 1024px) { .ad-slot:not(.ad-show-desktop) { display: none !important; } }

/* ── Breadcrumbs ────────────────────────────────────────── */
.crumbs { max-width: 1160px; margin: var(--sp-4) auto 0; padding: 0 var(--sp-5); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); font-weight: 600; }
.crumbs a:hover { color: var(--brand); }
.crumbs li::after { content: "›"; margin-left: 6px; color: var(--ink-3); }
.crumbs li:last-child::after { content: ""; }
.crumbs li[aria-current] { color: var(--ink); }

/* ── Pad caption (clarifies the remaining-count) ────────── */
.pad-caption {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: var(--sp-3); font-size: 12.5px; color: var(--ink-3);
}
.pad-caption .chip {
  display: inline-grid; place-items: center; position: relative;
  width: 26px; height: 22px; border: 1px solid var(--line-2); border-radius: 6px;
  font-weight: 700; color: var(--ink-2); font-size: 13px; flex-shrink: 0;
}
.pad-caption .chip i {
  position: absolute; top: -5px; right: -6px;
  background: var(--brand); color: #fff; font-style: normal;
  font-size: 9px; font-weight: 800; padding: 1px 4px; border-radius: 8px;
}

/* ── SEO content shell ──────────────────────────────────── */
.seo { max-width: 1160px; margin: var(--sp-10) auto 0; padding: 0 var(--sp-5); }
.seo-intro { max-width: 760px; margin: 0 auto var(--sp-8); text-align: center; }
.seo-intro h2 { font-family: var(--font-display); font-size: 27px; letter-spacing: -.02em; margin-bottom: 10px; }
.seo-intro p { color: var(--ink-2); font-size: 15.5px; }

/* tips widget */
.tips {
  max-width: 820px; margin: 0 auto var(--sp-8);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--r-lg); padding: var(--sp-6);
}
.tips h3 { font-family: var(--font-display); font-size: 18px; display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.tips h3 svg { width: 22px; height: 22px; color: var(--brand); }
.tips ul { list-style: none; display: grid; gap: 10px; }
.tips li { position: relative; padding-left: 28px; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.tips li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--support); font-weight: 800; }
.tips li b { color: var(--ink); }

/* try-other-puzzles rail */
.try-section { max-width: 1160px; margin: var(--sp-10) auto 0; padding: 0 var(--sp-5); }
.try-section .seo-intro { margin-bottom: var(--sp-6); }
.try-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-4); }
.try-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  padding: 26px 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); transition: all .2s var(--ease);
}
.try-card:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--sh-md); }
.try-card .ti { width: 60px; height: 60px; border-radius: 15px; display: grid; place-items: center; color: #fff; }
.try-card .ti svg { width: 30px; height: 30px; }
.try-card b { font-size: 15px; color: var(--ink); }
.try-card span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.ti-mini { background: linear-gradient(135deg,#0D9488,#14B8A6); }
.ti-medium { background: linear-gradient(135deg,#4F46E5,#7C3AED); }
.ti-hard { background: linear-gradient(135deg,#E11D48,#F43F5E); }
.ti-expert { background: linear-gradient(135deg,#F59E0B,#E11D48); }
.ti-strands { background: linear-gradient(135deg,#4F46E5,#0D9488); }
.ti-crypto { background: linear-gradient(135deg,#0D9488,#059669); }
@media (max-width: 1100px) { .try-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 680px) { .try-grid { grid-template-columns: repeat(2,1fr); gap: 12px; } .try-card { padding: 20px 12px; } }

/* why-play feature grid (reuses .feat from app.css) */
.whyplay { max-width: 1160px; margin: var(--sp-10) auto 0; padding: 0 var(--sp-5); }

/* article prose (AISEO / citation depth) */
.prose { max-width: 760px; margin: var(--sp-10) auto 0; padding: 0 var(--sp-5); }
.prose h2 { font-family: var(--font-display); font-size: 24px; letter-spacing: -.02em; margin: var(--sp-6) 0 var(--sp-3); }
.prose h3 { font-family: var(--font-display); font-size: 18px; margin: var(--sp-5) 0 var(--sp-2); }
.prose p { color: var(--ink-2); font-size: 15.5px; margin-bottom: var(--sp-4); }
.prose ul { margin: 0 0 var(--sp-4) 20px; color: var(--ink-2); font-size: 15px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); }
.prose .cite { font-size: 13px; color: var(--ink-3); border-left: 3px solid var(--line-2); padding-left: 12px; font-style: italic; }

/* country / language links in footer */
.ftr-langs { max-width: 1160px; margin: 0 auto; padding: var(--sp-5) var(--sp-5) 0; }
.ftr-langs h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: var(--sp-3); font-weight: 700; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 8px; }
.lang-grid a { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 500; padding: 4px 0; }
.lang-grid a:hover { color: var(--brand); }
.lang-grid .fl { font-size: 16px; }

/* feedback floating button + panel */
.fb-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 140;
  height: 44px; padding: 0 16px 0 12px; border-radius: 22px; border: none;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--sh-md); transition: transform .15s, box-shadow .15s;
  font-family: var(--font-ui); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.fb-btn:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.fb-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.fb-btn .fb-label { letter-spacing: .01em; }
/* Collapse to icon-only on very small screens */
@media (max-width: 380px) { .fb-btn .fb-label { display: none; } .fb-btn { width: 44px; padding: 0; justify-content: center; border-radius: 50%; } }
.fb-panel {
  position: fixed; right: 18px; bottom: 74px; z-index: 141;
  width: min(340px, 90vw); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: var(--sp-5);
  display: none; animation: rise .22s var(--ease); position: fixed;
}
.fb-panel.show { display: block; }
.fb-panel h4 { font-family: var(--font-display); font-size: 16px; margin-bottom: 10px; padding-right: 28px; }
.fb-panel textarea { width: 100%; height: 96px; resize: none; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); }
.fb-panel .fb-send { width: 100%; margin-top: 10px; height: 42px; border: none; border-radius: var(--r-sm); background: var(--brand); color: #fff; font-weight: 700; cursor: pointer; }
.fb-panel .fb-note { font-size: 11px; color: var(--ink-3); margin-top: 10px; line-height: 1.4; }
.fb-panel .fb-x { position: absolute; top: 10px; right: 12px; border: none; background: none; color: var(--ink-3); font-size: 22px; cursor: pointer; line-height: 1; }

@media print { .ad-slot, .fb-btn, .fb-panel { display: none !important; } }
