/* ==========================================================================
   Tokens. Light by default; dark via the toggle (data-theme) or the device setting.
   ========================================================================== */
:root {
  --brand: #fffc00;
  --on-brand: #111111;
  --accent: #0b6bcb;
  --bg: #ffffff;
  --bg-alt: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #f1f1ee;
  --text: #121212;
  --muted: #5d6066;
  --border: rgb(18 18 18 / 10%);
  --border-strong: rgb(18 18 18 / 18%);
  --error: #b42318;
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1080px;
  --narrow: 760px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --accent: #6cb4ff;
  --bg: #0b0c0f;
  --bg-alt: #111318;
  --surface: #15171c;
  --surface-2: #1d2027;
  --text: #ececec;
  --muted: #a0a4ad;
  --border: rgb(255 255 255 / 9%);
  --border-strong: rgb(255 255 255 / 18%);
  --error: #ff8a80;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #6cb4ff;
    --bg: #0b0c0f;
    --bg-alt: #111318;
    --surface: #15171c;
    --surface-2: #1d2027;
    --text: #ececec;
    --muted: #a0a4ad;
    --border: rgb(255 255 255 / 9%);
    --border-strong: rgb(255 255 255 / 18%);
    --error: #ff8a80;
    color-scheme: dark;
  }
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 130px; }
@media (max-width: 420px) { html { font-size: 106.25%; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 5.5vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 3.4vw, 1.75rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
.narrow { max-width: var(--narrow); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--brand); color: var(--on-brand); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 12%); }
.btn-primary:hover { filter: brightness(.96); }
.btn-primary:disabled { opacity: .7; cursor: progress; }
.btn-small { min-height: 34px; padding: 0 14px; font-size: .875rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

/* ==========================================================================
   Header / footer
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; min-width: 0; }
.logo img { flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.logo-text small { font-weight: 500; font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.nav-link, .menu summary { color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .94rem; cursor: pointer; }
.nav-link:hover, .menu summary:hover { background: var(--surface-2); }
.menu { position: relative; }
.menu summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.menu summary::-webkit-details-marker { display: none; }
.menu-tools summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); margin-inline-start: 4px; }
.menu-lang summary svg { width: 20px; height: 20px; }
.menu ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; min-width: 240px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 12px 32px -8px rgb(0 0 0 / 25%); }
.menu-lang ul { min-width: 160px; }
.menu ul a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .94rem; }
.menu ul a:hover, .menu ul a[aria-current] { background: var(--surface-2); }
@media (max-width: 760px) { .nav-link { display: none; } .logo-text small { display: none; } }
@media (max-width: 380px) { .logo-text { display: none; } }

.site-footer { margin-top: 64px; padding: 40px 0 24px; background: var(--bg-alt); border-top: 1px solid var(--border); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1.2fr 1fr .8fr 1.3fr 1fr; }
.footer-grid .btn { margin-top: 4px; }
.footer-wrap { flex-flow: row wrap !important; gap: 6px 14px !important; align-content: start; }
.footer-wrap .footer-title { flex-basis: 100%; }
.footer-title-gap { margin-top: 14px !important; }
.footer-bottom { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; }
.footer-bottom p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-links a { color: var(--muted); }
.footer-grid nav { display: flex; flex-direction: column; gap: 6px; }
.footer-grid nav a { color: var(--muted); text-decoration: none; font-size: .94rem; }
.footer-grid nav a:hover { color: var(--text); }
.footer-langs { flex-flow: row wrap !important; gap: 6px 14px !important; align-content: start; }
.footer-langs .footer-title { flex-basis: 100%; }
.footer-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 4px; }
.copyright { margin-top: 28px; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Search
   ========================================================================== */
.search { margin: 22px 0 6px; }
.search-box {
  display: flex; align-items: center; gap: 6px; padding: 6px;
  background: var(--surface); border: 2px solid var(--border-strong); border-radius: 999px;
}
.search-box:focus-within { border-color: var(--text); }
.is-invalid .search-box { border-color: var(--error); }
.search-ghost { flex: none; margin-inline-start: 8px; border-radius: 7px; }
.paste-btn { display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: .85rem; font-weight: 600; cursor: pointer; }
.paste-btn svg { width: 16px; height: 16px; }
.paste-btn:hover { filter: brightness(.97); }
.search-result { margin-top: 12px; padding: 16px; text-align: start; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); }
.result-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.result-head img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--brand); }
.result-head div { display: flex; flex-direction: column; }
.result-big { font-size: 1.1rem; margin: 0 0 4px; }
.result-big b { font-size: 2.2rem; font-weight: 800; }
.result-ok { color: #1a7f37; font-weight: 600; }
.result-none { margin: 0; font-weight: 600; }
.search input {
  flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 1.05rem;
}
.search-btn { min-height: 46px; padding-inline: 20px; }
.search-msg { min-height: 1.4em; margin: 8px 6px 0; font-size: .9rem; color: var(--error); }
@media (max-width: 480px) {
  .search-box { flex-wrap: wrap; border-radius: 22px; }
  .search-btn { flex-basis: 100%; }
}

/* ==========================================================================
   Homepage
   ========================================================================== */
.hero { padding: 44px 0 18px; text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 22%, var(--bg)) 0%, var(--bg) 100%); }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 36em; margin-inline: auto; }
.hero .search { text-align: start; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; padding: 0; margin: 4px 0 14px; list-style: none; font-size: .92rem; font-weight: 600; }
.chips li { display: inline-flex; align-items: center; gap: 6px; }
.chips svg { width: 16px; height: 16px; color: #1a7f37; }
.rule { font-size: .9rem; color: var(--muted); max-width: 40em; margin-inline: auto; }

.section { padding: 34px 0; }
.section-tight { padding-top: 6px; }
.h-small { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.pills a { display: inline-block; padding: 7px 14px; border: 1px solid var(--border-strong); border-radius: 999px; text-decoration: none; color: var(--text); font-size: .92rem; }
.pills a:hover { background: var(--surface-2); }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding: 16px 16px 4px 60px; background: var(--bg-alt); border-radius: var(--radius); }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 15px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 800; }
.steps h3 { margin-bottom: 4px; }

.table-wrap { overflow-x: auto; margin: 0 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--border); }
thead th { background: var(--bg-alt); font-size: .85rem; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 600; }

.fixes { margin: 0; display: grid; gap: 10px; }
.fixes div { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.fixes dt { font-weight: 700; }
.fixes dd { margin: 4px 0 0; color: var(--muted); }

.faq { border-bottom: 1px solid var(--border); }
.faq summary { padding: 14px 0; font-weight: 700; cursor: pointer; list-style-position: outside; }
.faq p { color: var(--muted); }

.prose { padding-top: 32px; }
.prose li { margin-bottom: 8px; }
.missing { padding-top: 48px; text-align: center; }
.missing .search { text-align: start; }

/* ==========================================================================
   Profile page
   ========================================================================== */
.profile { padding-top: 14px; }
.crumbs a { color: inherit; }
.profile-head { display: flex; gap: 18px; align-items: center; margin: 14px 0 12px; }
.avatar { width: 96px; height: 96px; flex: none; border-radius: 50%; object-fit: cover; background: var(--surface-2); box-shadow: 0 0 0 3px var(--brand); }
.profile-id h1 { font-size: clamp(1.45rem, 5vw, 2rem); margin-bottom: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.badge { width: 22px; height: 22px; color: var(--brand); filter: drop-shadow(0 0 1px rgb(0 0 0 / 50%)); }
.handle { margin: 0 0 4px; color: var(--muted); }
.handle b { color: var(--text); }
.bio { margin: 0 0 6px; white-space: pre-line; }
.profile-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; }
.summary { color: var(--muted); font-size: .95rem; }

.tabs { position: sticky; top: 58px; z-index: 10; display: flex; gap: 6px; padding: 8px 0; margin: 0 -16px; padding-inline: 16px; overflow-x: auto; background: var(--bg); border-bottom: 1px solid var(--border); }
.tabs a { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; }
.tabs a span { color: var(--muted); font-weight: 500; margin-inline-start: 4px; }

.block { padding-top: 26px; }
.block h2 { font-size: 1.25rem; }
.empty { padding: 18px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--muted); }

.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.grid-story { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
.grid-story.is-collapsed > li:nth-child(n+25) { display: none; }
.show-all { margin-top: 12px; }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { filter: brightness(.97); }
@media (min-width: 700px) { .grid-story { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.tile {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-2);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.tile:hover img { transform: scale(1.03); }
.tile::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgb(0 0 0 / 55%)); pointer-events: none; }
.tile time, .tile-meta { position: absolute; z-index: 1; bottom: 6px; font-size: .75rem; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / 60%); }
.tile time { inset-inline-end: 8px; }
.tile-meta { inset-inline-start: 8px; }
.tile-icon { position: absolute; z-index: 1; top: 8px; inset-inline-end: 8px; width: 22px; height: 22px; border-radius: 50%; background: rgb(0 0 0 / 45%); }
.tile-icon::before { content: ""; position: absolute; left: 8px; top: 6px; border: 5px solid transparent; border-left: 8px solid #fff; border-right: 0; }

.grid-hl { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 10px; }
.hl { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: center; }
.hl img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--surface-2); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--border-strong); margin-bottom: 6px; transition: box-shadow .15s; }
.hl:hover img { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--brand); }
.hl.is-loading img { animation: pulse 1s infinite; }
.hl-title { font-size: .85rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-error { color: var(--error); margin: 4px 0 0; text-align: center; }
@keyframes pulse { 50% { opacity: .5; } }

.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.people a { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.people a:hover { background: var(--surface-2); }
.people img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.people span { display: flex; flex-direction: column; min-width: 0; }
.block-search { padding-top: 40px; }

/* ==========================================================================
   Viewer (full-screen story player)
   ========================================================================== */
.viewer-open { overflow: hidden; }
.viewer {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #000; color: #fff; overflow: hidden;
}
.viewer::backdrop { background: #000; }
.v-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.v-stage video, .v-stage img { width: 100%; height: 100%; max-width: min(100vw, calc(100dvh * 9 / 16)); object-fit: contain; }
@media (min-width: 700px) { .v-stage video, .v-stage img { border-radius: 12px; height: calc(100% - 24px); } }
.v-bars { position: absolute; z-index: 3; top: max(8px, env(safe-area-inset-top)); left: 50%; translate: -50% 0; width: min(100% - 16px, calc(100dvh * 9 / 16) - 16px); display: flex; gap: 3px; }
.v-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgb(255 255 255 / 35%); overflow: hidden; }
.v-bars i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.v-top { position: absolute; z-index: 3; top: calc(max(8px, env(safe-area-inset-top)) + 10px); left: 50%; translate: -50% 0; width: min(100% - 8px, calc(100dvh * 9 / 16)); display: flex; align-items: center; gap: 2px; padding-inline: 8px; }
.v-who { flex: 1; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; min-width: 0; font-size: .9rem; line-height: 1.25; text-shadow: 0 1px 2px rgb(0 0 0 / 60%); }
.v-who img { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; }
.v-who b, .v-time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-time { font-size: .78rem; opacity: .85; }
.v-btn { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 60%)); }
.v-btn:hover { background: rgb(255 255 255 / 12%); }
.v-btn svg { width: 24px; height: 24px; }
.v-btn.is-muted .v-wave { display: none; }
.v-btn.is-busy { animation: pulse .8s infinite; }
.v-zone { position: absolute; z-index: 2; top: 70px; bottom: 0; border: 0; background: transparent; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; }
.v-prev { left: 0; width: 35%; }
.v-next { right: 0; width: 65%; }
.v-msg { position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 32px; margin: 0; text-align: center; font-size: .95rem; }
.v-msg:empty { display: none; }
.viewer.is-paused .v-bars, .viewer.is-paused .v-top { opacity: .35; }

/* ==========================================================================
   Dialog (iOS install)
   ========================================================================== */
.dialog { max-width: 420px; border: 0; border-radius: var(--radius); padding: 22px; background: var(--surface); color: var(--text); }
.dialog::backdrop { background: rgb(0 0 0 / 50%); }
.dialog-steps { padding-inline-start: 20px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Homepage & tool pages (v2)
   ========================================================================== */
.center { text-align: center; }
.hero-ghost { display: block; margin: 0 auto 12px; border-radius: 16px; box-shadow: 0 6px 18px -6px rgb(0 0 0 / 30%); }
.hero-tool { padding-top: 18px; }
.hero-tool .crumbs { text-align: start; margin-bottom: 18px; }
.section-alt { background: var(--bg-alt); }
.history { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 14px; font-size: .9rem; }
.history-label { color: var(--muted); }
.chips-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); }
.chip a { padding: 4px 4px 4px 12px; color: var(--text); text-decoration: none; }
.chip-x { width: 28px; height: 28px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 50%; font-size: 1.1rem; line-height: 1; }
.chip-x:hover { color: var(--error); }
.tool-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 6px 0 10px; }
.tool-badges a { padding: 5px 12px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: .85rem; font-weight: 700; text-decoration: none; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 10%); }
.tool-badges a:hover { filter: brightness(.95); }

.cards { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { padding: 20px; background: var(--bg-alt); border-radius: var(--radius); }
.section-alt .card { background: var(--surface); }
.cards-numbered { counter-reset: c; }
.cards-numbered .card h3::before { counter-increment: c; content: counter(c); display: inline-grid; place-items: center; width: 26px; height: 26px; margin-inline-end: 8px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: .85rem; }

.features { display: grid; gap: 22px 28px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 22px; }
.feature { display: flex; gap: 14px; }
.feature-icon { flex: none; font-size: 1.7rem; line-height: 1.2; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; }

.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-inline-start: 28px; margin-bottom: 8px; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .45em; width: 12px; height: 7px; border: solid #1a7f37; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }

.post-cards { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.post-cards a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.post-cards a:hover { border-color: var(--border-strong); }
.post-cards b { color: var(--accent); font-size: 1.05rem; line-height: 1.3; }
.post-cards span { color: var(--muted); font-size: .94rem; }
.post-cards-small { grid-template-columns: 1fr; }

.tool-grid { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.tool-grid a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.tool-grid a:hover { border-color: var(--text); }
.tool-grid span { color: var(--muted); font-size: .9rem; }

.prose-block table, .prose table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .95rem; }
.prose-block th, .prose-block td, .prose th, .prose td { border: 1px solid var(--border-strong); }
.prose-block thead th, .prose thead th { background: var(--bg-alt); }
.prose-block code, .prose code { padding: 1px 6px; border-radius: 6px; background: var(--surface-2); font-size: .9em; overflow-wrap: anywhere; }
.prose-wide { padding-top: 24px; }
.post .post-cta { display: flex; gap: 14px; align-items: center; margin: 32px 0 6px; padding: 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--brand) 22%, var(--bg)); }
.post-cta img { border-radius: 10px; flex: none; }
.post-cta p { margin: 2px 0 0; }

/* Status panel (/is-snapchat-down) */
.status-panel { margin: 18px 0 8px; padding: 18px; text-align: start; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); }
.status-head { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 800; margin: 0 0 12px; }
.status-head .dot { width: 14px; height: 14px; flex: none; border-radius: 50%; background: var(--muted); }
[data-state="up"] .dot { background: #1a7f37; box-shadow: 0 0 0 5px rgb(26 127 55 / 18%); }
[data-state="partial"] .dot { background: #b7791f; }
[data-state="down"] .dot { background: var(--error); }
.status-panel td.ok { color: #1a7f37; font-weight: 700; }
.status-panel td.bad { color: var(--error); font-weight: 700; }
.status-panel.is-checking { opacity: .6; }

/* Spotlight video page */
.spotlight { padding-top: 14px; }
.sp-player { display: grid; place-items: center; margin: 16px 0; background: #000; border-radius: var(--radius); overflow: hidden; }
.sp-player video { width: 100%; height: auto; aspect-ratio: 9 / 16; max-height: 62vh; max-width: calc(62vh * 9 / 16); }
@media (min-width: 700px) { .sp-player video { max-height: 78vh; max-width: calc(78vh * 9 / 16); } }
.sp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.btn-lg { min-height: 50px; padding: 0 22px; font-size: 1rem; }
.btn svg { width: 20px; height: 20px; }
.btn.is-busy { opacity: .7; cursor: progress; }
.facts { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.facts th { width: 40%; color: var(--muted); font-weight: 500; }

/* ==========================================================================
   How it works: zigzag timeline with screenshots (homepage and /how-it-works)
   ========================================================================== */
.howto-title { text-align: center; margin-bottom: 10px; }
.howto-title span { display: inline-block; padding: 10px 26px; border-radius: 18px; background: var(--brand); color: var(--on-brand); transform: rotate(-1deg); box-shadow: 0 4px 0 rgb(0 0 0 / 18%); }
.howto-intro { text-align: center; color: var(--muted); max-width: 40em; margin: 14px auto 34px; }
.howto-page { margin: 10px auto 30px; }
.howto-steps { position: relative; list-style: none; padding: 0; margin: 0 auto; max-width: 980px; }
.howto-steps::before { content: ""; position: absolute; left: 50%; top: 10px; bottom: 10px; border-left: 3px dashed var(--border-strong); transform: translateX(-50%); }
.howto-step { position: relative; width: calc(50% - 44px); margin: 0 0 40px; }
.howto-step:nth-child(odd) { margin-inline-end: auto; }
.howto-step:nth-child(even) { margin-inline-start: auto; }
.howto-num { position: absolute; top: -4px; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--brand); color: var(--on-brand); font-weight: 800; font-size: 1.3rem; box-shadow: 0 4px 0 rgb(0 0 0 / 22%); }
.howto-step:nth-child(odd) .howto-num { inset-inline-end: -68px; }
.howto-step:nth-child(even) .howto-num { inset-inline-start: -68px; }
.howto-card { padding: 20px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); }
.howto-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.howto-card p { color: var(--muted); }
.howto-shot { margin: 14px 0 0; padding: 14px; display: grid; place-items: center; background: var(--surface-2); border-radius: 14px; }
.howto-shot img { width: 100%; max-width: 250px; height: auto; border-radius: 12px; box-shadow: 0 8px 24px -8px rgb(0 0 0 / 35%); }
@media (max-width: 720px) {
  .howto-steps::before { display: none; }
  .howto-step, .howto-step:nth-child(odd), .howto-step:nth-child(even) { width: 100%; margin: 0 0 26px; }
  .howto-step:nth-child(n) .howto-num { inset: auto; }
  .howto-num { position: relative; z-index: 2; width: 40px; height: 40px; margin-bottom: -20px; margin-inline-start: 16px; font-size: 1.1rem; }
  .howto-card { padding-top: 28px; }
}

/* ==========================================================================
   Ads: space is reserved so the page doesn't jump when an ad arrives; empty slots disappear.
   ========================================================================== */
.ad { width: 100%; max-width: var(--wrap); margin: 22px auto; padding-inline: 16px; text-align: center; }
.profile .ad, .spotlight .ad, .post .ad { padding-inline: 0; }
.ad-label { display: block; margin-bottom: 4px; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ad .adsbygoogle { display: block; min-height: 100px; }
@media (max-width: 640px) { .ad .adsbygoogle { min-height: 250px; } }
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }

/* Internal links */
.tool-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.tool-links a { padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text); text-decoration: none; font-size: .9rem; }
.tool-links a:hover { background: var(--surface-2); }
.related-tools { margin-top: 32px; }
.related-tools h2 { font-size: 1.25rem; }

/* Small phones: keep the header on one line with the larger text size */
@media (max-width: 480px) {
  .logo { font-size: .95rem; gap: 7px; }
  .logo-text { white-space: nowrap; }
  .logo img { width: 30px; height: 30px; }
  .menu-lang summary span { display: none; }
  .nav-link, .menu summary { padding: 8px 7px; }
}

/* ==========================================================================
   Profile: big story / highlight / Spotlight cards with "Load more"
   ========================================================================== */
.cards-grid { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 46%), 1fr)); }
.snap-card { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; aspect-ratio: 9 / 16; border: 1px solid var(--border-strong); border-radius: 16px; background: #111; color: #fff; text-align: start; cursor: pointer; }
.snap-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.snap-card:hover img { transform: scale(1.03); }
.snap-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.sc-badge { position: absolute; top: 12px; inset-inline-end: 12px; min-width: 40px; height: 40px; padding: 0 10px; display: grid; place-items: center; border-radius: 999px; background: rgb(20 24 40 / 82%); color: var(--brand); font-weight: 800; font-size: .95rem; }
.sc-play { position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; translate: -50% -50%; border-radius: 50%; background: rgb(0 0 0 / 45%); box-shadow: 0 0 0 2px rgb(255 255 255 / 70%); opacity: .9; }
.sc-play::before { content: ""; position: absolute; left: 22px; top: 17px; border: 11px solid transparent; border-left: 16px solid #fff; border-right: 0; }
.sc-foot { position: absolute; inset: auto 0 0; display: flex; flex-direction: column; gap: 2px; padding: 44px 16px 14px; background: linear-gradient(transparent, rgb(0 0 0 / 82%)); font-size: .9rem; text-shadow: 0 1px 2px rgb(0 0 0 / 60%); }
.sc-foot b { font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-foot span, .sc-foot time { opacity: .85; }
.snap-card.is-loading { animation: pulse 1s infinite; }
.load-more { display: flex; margin: 18px auto 0; min-width: 200px; min-height: 52px; font-size: 1.05rem; }
.profile-head .avatar { width: 120px; height: 120px; }
@media (max-width: 520px) {
  .cards-grid { gap: 10px; }
  .sc-badge { top: 8px; inset-inline-end: 8px; min-width: 32px; height: 32px; font-size: .8rem; }
  .sc-play { width: 44px; height: 44px; }
  .sc-play::before { left: 17px; top: 12px; border-width: 10px; border-left-width: 14px; }
  .sc-foot { padding: 32px 10px 10px; font-size: .8rem; }
  .sc-foot b { font-size: .92rem; }
  .profile-head .avatar { width: 88px; height: 88px; }
}

/* ==========================================================================
   Blog: index, cards with covers, featured post, tips, category filter, YouTube boxes
   ========================================================================== */
.blog-hero { padding-bottom: 30px; }
.blog-hero .crumbs { text-align: start; margin-bottom: 18px; }
.featured { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; margin: 10px 0 0; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.featured img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 26px; }
.featured-body b { font-size: 1.45rem; line-height: 1.25; }
@media (max-width: 760px) { .featured { grid-template-columns: 1fr; } .featured-body { padding: 18px; } }
.post-cat { align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: .72rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }

.tip-cards { display: grid; gap: 16px; margin-top: 20px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.tip-card { padding: 22px; border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--border); }
.tip-card h3 { margin: 8px 0 10px; }
.tip-card .ticks { margin: 0; }

.cat-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 6px; }
.cat-filter button { padding: 7px 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); font-size: .9rem; cursor: pointer; }
.cat-filter button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

.blog-grid { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.blog-grid a { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.blog-grid a:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.blog-grid img { width: 100%; height: auto; aspect-ratio: 40 / 21; object-fit: cover; }
.bg-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.bg-body b { font-size: 1.05rem; line-height: 1.3; }
.bg-body .muted { font-size: .92rem; }
.blog-grid-small { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.post-cover { width: 100%; height: auto; margin: 6px 0 22px; border-radius: var(--radius); }
.post-figure { margin: 22px 0; text-align: center; }
.post-figure img { display: inline-block; width: 100%; max-width: 300px; height: auto; border-radius: 14px; box-shadow: 0 8px 24px -8px rgb(0 0 0 / 35%); }
.post-figure figcaption { margin-top: 8px; font-size: .9rem; color: var(--muted); }

.yt { margin: 24px 0; }
.yt-thumb { position: relative; display: block; overflow: hidden; border-radius: 14px; background: #000; aspect-ratio: 16 / 9; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.yt-play { position: absolute; top: 50%; left: 50%; width: 72px; height: 50px; translate: -50% -50%; border-radius: 14px; background: #ff0033; box-shadow: 0 6px 18px rgb(0 0 0 / 40%); }
.yt-play::before { content: ""; position: absolute; left: 29px; top: 15px; border: 10px solid transparent; border-left: 16px solid #fff; border-right: 0; }
.yt-thumb:hover .yt-play { filter: brightness(1.1); }
.yt-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; background: #000; }
.yt figcaption { margin-top: 8px; }

/* ==========================================================================
   Social: share bars and "Follow us" icons (plain links, no third-party scripts)
   ========================================================================== */
.share { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin: 14px 0; }
.post .share, .profile .share, .spotlight .share { justify-content: flex-start; }
.share-label { font-size: .9rem; font-weight: 700; color: var(--muted); }
.share-list, .follow { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.share-btn, .follow-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; color: #fff; cursor: pointer; transition: transform .15s, filter .15s; }
.share-btn:hover, .follow-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.share-btn svg, .follow-btn svg { width: 19px; height: 19px; }
.share-whatsapp { background: #25d366; }
.share-x { background: #000; }
.share-facebook { background: #0866ff; }
.share-telegram { background: #26a5e4; }
.share-reddit { background: #ff4500; }
.share-pinterest { background: #bd081c; }
.share-copy, .share-more { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.share-msg { min-width: 6em; color: #1a7f37; font-weight: 600; }
:root[data-theme="dark"] .share-x { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 30%); }
.follow { margin: 6px 0 12px; }
.follow-btn { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.follow-x:hover { background: #000; color: #fff; }
.follow-instagram:hover { background: #e4405f; color: #fff; }
.follow-tiktok:hover { background: #000; color: #fff; }
.follow-youtube:hover { background: #ff0000; color: #fff; }
.follow-facebook:hover { background: #0866ff; color: #fff; }
.follow-snapchat:hover { background: #fffc00; color: #111; }
.follow-pinterest:hover { background: #bd081c; color: #fff; }
.follow-reddit:hover { background: #ff4500; color: #fff; }
.follow-telegram:hover { background: #26a5e4; color: #fff; }
.follow-threads:hover { background: #000; color: #fff; }
.follow-discord:hover { background: #5865f2; color: #fff; }
@media (max-width: 420px) {
  .share-list, .follow { gap: 6px; }
  .share-btn, .follow-btn { width: 36px; height: 36px; }
  .share-btn svg, .follow-btn svg { width: 17px; height: 17px; }
}

.tldr { margin: 8px 0 22px; padding: 14px 18px; border-left: 5px solid var(--brand); border-radius: 10px; background: var(--bg-alt); }

/* Previous / next guide */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 30px 0 10px; }
.post-nav a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.post-nav a:hover { border-color: var(--border-strong); }
.pn-newer { grid-column: 2; text-align: end; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } .pn-newer { grid-column: 1; } }
