/* ============ Reusable components ============ */

/* Buttons */
.btn {
  --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--line-2);
  display: inline-flex; align-items: center; gap: .55em; min-height: 44px; padding: 0 1.15em;
  border-radius: var(--r-pill); border: 1px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg);
  font-size: var(--fs-sm); font-weight: 500; letter-spacing: .01em; white-space: nowrap;
  transition: background var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.btn:hover { --btn-bd: var(--text-3); background: rgba(255, 240, 220, .04); }
.btn:active { transform: scale(.98); }
.btn--primary { --btn-bg: var(--moon); --btn-fg: var(--on-moon); --btn-bd: var(--moon); }
.btn--primary:hover { --btn-bg: #f6ecd9; background: var(--btn-bg); }
.btn--sm { min-height: 38px; padding: 0 .95em; font-size: var(--fs-xs); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* Arrow link — the site's default CTA. Arrow nudges on hover. */
.link-arrow {
  display: inline-flex; align-items: center; gap: .5em; font-size: var(--fs-sm); font-weight: 500;
  color: var(--text); border-bottom: 1px solid var(--line-2); padding-bottom: 3px;
  transition: border-color var(--t-base) var(--ease-out), color var(--t-base);
}
.link-arrow::after { content: "→"; transition: transform var(--t-base) var(--ease-out); }
.link-arrow:hover { border-color: var(--moon); color: var(--moon); }
.link-arrow:hover::after { transform: translateX(4px); }

/* Section header */
.section-head { display: grid; gap: var(--s-4); margin-bottom: var(--s-7); }
.section-head h2 { font-size: var(--fs-3xl); max-width: 20ch; text-wrap: balance; }
.section-head p { color: var(--text-2); max-width: 34em; }
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: 1fr auto; align-items: end; }
  .section-head--split > :last-child { justify-self: end; }
}

/* Chips (radio-like). Color dot uses --dot. */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: .5em; min-height: 40px; padding: 0 .95em;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--text-2);
  font-size: var(--fs-sm); transition: all var(--t-base) var(--ease-out);
}
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--on-moon); border-color: var(--text); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--text-3)); box-shadow: 0 0 0 1px rgba(0,0,0,.25) inset; }
.chip--mono { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .02em; }

/* Placeholder marker — anything mock must wear this */
.ph-tag {
  display: inline-flex; align-items: center; gap: .4em; padding: 3px 8px; border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--lamp); border: 1px dashed color-mix(in srgb, var(--lamp) 60%, transparent); background: rgba(10, 8, 6, .55);
}

/* Video card (real catalogue item, no iframe) */
.vcard { display: grid; grid-template-columns: 112px 1fr; gap: var(--s-3); align-items: center; padding: var(--s-2); border-radius: var(--r-md); transition: background var(--t-base); }
.vcard:hover { background: rgba(255, 240, 220, .04); }
.vcard__thumb { position: relative; aspect-ratio: 16/9; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.vcard__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.vcard:hover .vcard__thumb img { transform: scale(1.05); }
.vcard__len { position: absolute; right: 4px; bottom: 4px; padding: 1px 5px; border-radius: 4px; background: rgba(0,0,0,.72); font-family: var(--font-mono); font-size: 10px; }
.vcard__title { font-size: var(--fs-sm); line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard__meta { margin-top: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); display: flex; gap: .6em; align-items: center; }
.vcard__meta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color var(--t-base);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; gap: var(--s-5); height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-size: 1.65rem; letter-spacing: -.01em; }
.brand svg { width: 22px; height: 22px; }
/* Luneia logo (moon + brain), drawn from an alpha mask so it always uses the site colour */
.logo { display: inline-block; flex: none; width: 1.15em; height: 1.24em; background: var(--moon);
  -webkit-mask: url("/assets/img/brand/logo.svg") center / contain no-repeat; mask: url("/assets/img/brand/logo.svg") center / contain no-repeat; }
.nav { margin-left: auto; display: none; gap: var(--s-6); font-size: var(--fs-sm); color: var(--text-2); }
.nav a { position: relative; padding-block: 6px; transition: color var(--t-base); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--moon); transform: scaleX(0); transform-origin: left; transition: transform var(--t-base) var(--ease-out); }
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
@media (min-width: 900px) { .nav + .header-actions { margin-left: 0; } }
.menu-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); }
@media (min-width: 900px) { .menu-btn { display: none; } }
.menu-btn span { display: block; width: 16px; height: 1px; background: var(--text); box-shadow: 0 5px 0 var(--text); transform: translateY(-2.5px); }
.header-cta { display: none; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .menu-btn { display: none; }
  .header-cta { display: inline-flex; }
}

/* Mobile menu sheet */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60; background: var(--bg); padding: 88px var(--gutter) var(--s-6);
  display: flex; flex-direction: column; gap: var(--s-5);
  opacity: 0; visibility: hidden; transition: opacity var(--t-base), visibility var(--t-base);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu a.big { font-family: var(--font-display); font-size: 2.6rem; line-height: 1.1; }
.mobile-menu .close { position: absolute; top: 14px; right: var(--gutter); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 1.2rem; }

/* Language (lazy Google Translate) */
.lang { position: relative; }
.lang__btn { display: inline-flex; align-items: center; gap: .4em; height: 38px; padding: 0 .8em; border-radius: var(--r-pill); border: 1px solid var(--line-2); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--text-2); }
.lang__btn svg { width: 14px; height: 14px; }
.lang__panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 230px; padding: 6px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-2);
  display: none; font-size: var(--fs-sm);
}
.lang.is-open .lang__panel { display: grid; }
.lang__panel a { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text-2); }
.lang__panel a:hover, .lang__panel a[aria-current] { background: var(--surface-2); color: var(--text); }
.lang__panel a span { font-size: var(--fs-xs); color: var(--text-3); }
.lang__panel p { padding: 8px 12px 6px; font-size: 11px; color: var(--text-3); border-top: 1px solid var(--line); margin-top: 4px; }
/* Hide Google's injected chrome */
.skiptranslate iframe, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--s-8) var(--s-6); background: var(--bg-2); }
.footer-grid { display: grid; gap: var(--s-7); grid-template-columns: repeat(2, 1fr); }
.footer-grid .brand-col { grid-column: 1 / -1; display: grid; gap: var(--s-4); max-width: 30ch; color: var(--text-2); font-size: var(--fs-sm); }
.footer-col h3 { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 400; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s-3); }
.footer-col li + li { margin-top: 8px; }
.footer-col a { font-size: var(--fs-sm); color: var(--text-2); transition: color var(--t-base); }
.footer-col a:hover { color: var(--moon); }
.footer-bottom { margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); justify-content: space-between; font-size: var(--fs-xs); color: var(--text-3); }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.footer-bottom a:hover { color: var(--text); }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.6fr repeat(4, 1fr); }
  .footer-grid .brand-col { grid-column: auto; }
}

/* Toast (used for "coming in a later phase" + prototype notices) */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 18px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line-2);
  font-size: var(--fs-sm); color: var(--text); box-shadow: var(--shadow-2); pointer-events: none;
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Form field (email — provider-agnostic) */
.field { display: flex; gap: var(--s-2); padding: 6px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--bg); transition: border-color var(--t-base); }
.field:focus-within { border-color: var(--moon); }
.field input { flex: 1; min-width: 0; width: 100%; background: none; border: 0; outline: 0; padding: 0 var(--s-4); font-size: var(--fs-md); }
.field input::placeholder { color: var(--text-3); }

/* ---------- Rail + article cards (Home, Learn, future blog pages) ---------- */
.rail { position: relative; }
.rail__track {
  display: flex; gap: var(--s-4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
  padding-bottom: var(--s-2); cursor: grab; overscroll-behavior-x: contain;
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.rail__track.is-dragging a { pointer-events: none; }
.rail__foot { display: flex; align-items: center; gap: var(--s-5); margin-top: var(--s-5); }
.rail__progress { flex: 1; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.rail__progress i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--moon); width: 20%; transform-origin: left; transition: transform 120ms linear; }
.rail__arrows { display: none; gap: var(--s-2); }
.rail__arrows button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: all var(--t-base); }
.rail__arrows button:hover:not(:disabled) { background: var(--moon); color: var(--on-moon); border-color: var(--moon); }
.rail__arrows button:disabled { opacity: .3; cursor: default; }
@media (hover: hover) and (min-width: 700px) { .rail__arrows { display: flex; } }

.post {
  flex: none; width: min(78vw, 340px); scroll-snap-align: start;
  display: grid; grid-template-rows: auto 1fr; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface); user-select: none;
  transition: border-color var(--t-base), transform var(--t-base) var(--ease-out);
}
.post:hover { border-color: var(--line-2); transform: translateY(-3px); }
.post--featured { width: min(86vw, 520px); }
.post__art { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.post--featured .post__art { aspect-ratio: 16/10; }
.post__art .art { position: absolute; inset: 0; transition: transform 1.2s var(--ease-out); }
.post:hover .post__art .art { transform: scale(1.04); }
.post__art .ph-tag { position: absolute; left: 12px; top: 12px; }
.post__body { padding: var(--s-4) var(--s-4) var(--s-5); display: grid; gap: var(--s-2); align-content: start; }
.post__meta { display: flex; gap: .8em; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.post__title { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.12; }
.post--featured .post__title { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); }
.post__excerpt { font-size: var(--fs-sm); color: var(--text-2); }

/* Generated placeholder covers (no stock images) */
.art--brown { background: radial-gradient(120% 90% at 20% 110%, #a8744f 0%, #5a3a26 40%, #1f1611 80%); }
.art--rhythm { background: #1c1814; }
.art--rhythm::before { content: ""; position: absolute; inset: 30% 10%; background: repeating-linear-gradient(90deg, var(--moon) 0 42px, transparent 42px 52px); opacity: .8; border-radius: 4px; mask: linear-gradient(90deg, #000 60%, transparent); }
.art--paper { background: linear-gradient(160deg, #ece3d3, #cfc2ad); }
.art--paper::before { content: ""; position: absolute; inset: 22% 20%; background: repeating-linear-gradient(180deg, rgba(40,30,20,.25) 0 1px, transparent 1px 16px); }
.art--phone { background: radial-gradient(70% 60% at 70% 30%, #3a4a63, #151a22 70%); }
.art--phone::before { content: ""; position: absolute; width: 22%; aspect-ratio: 9/18; right: 22%; top: 24%; border: 2px solid rgba(236,223,198,.6); border-radius: 12px; transform: rotate(-12deg); }
.art--desk { background: linear-gradient(180deg, #2b231c 0 62%, #3a2e24 62%); }
.art--desk::before { content: ""; position: absolute; left: 18%; top: 18%; width: 34%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(226,168,104,.55), transparent 65%); }
.art--alerts { background: linear-gradient(135deg, #1b2230, #2d3a52); }
.art--alerts::before { content: ""; position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: linear-gradient(90deg, transparent 0 18%, #8fa7cf 18% 20%, transparent 20% 58%, #8fa7cf 58% 60%, transparent 60%); box-shadow: 0 0 20px #8fa7cf; }

.post__art img.art { width: 100%; height: 100%; object-fit: cover; }

/* Panel (email, community, callouts) */
.panel { border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--surface); padding: clamp(1.5rem, 1rem + 2vw, 2.75rem); display: grid; gap: var(--s-5); align-content: start; }
.panel h2, .panel h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-2xl); line-height: 1.1; }
.panel p { color: var(--text-2); }
.panel--moon { background: radial-gradient(90% 120% at 100% 0%, rgba(236,223,198,.10), transparent 55%), var(--surface); }
.form-note { font-size: var(--fs-xs); color: var(--text-3); }
.panel { grid-template-columns: minmax(0, 1fr); }

/* Video tile (Finder, Learn) */
.vtile { display: grid; gap: var(--s-2); align-content: start; padding: var(--s-2); margin: calc(-1 * var(--s-2)); border-radius: var(--r-md); transition: background var(--t-base); }
.vtile:hover { background: rgba(255, 240, 220, .04); }
.vtile__thumb { position: relative; aspect-ratio: 16/9; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); }
.vtile__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.vtile:hover .vtile__thumb img { transform: scale(1.04); }
.vtile__title { font-size: var(--fs-sm); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vtile .vcard__meta { margin: 0; }
.vtile__yt { margin-left: auto; color: var(--text-3); opacity: 0; transition: opacity var(--t-base); }
.vtile:hover .vtile__yt { opacity: 1; color: var(--moon); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); flex: none; }

/* Rhythm bar (shared) */
.picker__bar { display: flex; gap: 3px; height: 10px; }
.picker__bar i { border-radius: 3px; transition: flex-grow var(--t-slow) var(--ease-out), background var(--t-slow) var(--ease-out); }
.picker__bar .f { background: var(--bar-c, var(--moon)); }
.picker__bar .b { background: repeating-linear-gradient(90deg, var(--line-2) 0 2px, transparent 2px 4px); }

/* ---------- Mobile: floating menu button (thumb zone) + bottom sheet ---------- */
@media (max-width: 899px) {
  .menu-btn {
    position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 70;
    width: 58px; height: 58px; border: 0; background: var(--moon); box-shadow: 0 12px 30px -8px rgba(0,0,0,.7), 0 0 0 6px rgba(15,13,11,.35);
    transition: transform var(--t-fast) var(--ease-out);
  }
  .menu-btn:active { transform: scale(.94); }
  .menu-btn span { background: var(--on-moon); box-shadow: 0 5px 0 var(--on-moon); }
  .menu-btn[aria-expanded="true"] { opacity: 0; pointer-events: none; }
  .mobile-menu { justify-content: flex-end; padding: var(--s-6) var(--gutter) max(24px, env(safe-area-inset-bottom)); background: rgba(10, 8, 7, .6); backdrop-filter: blur(6px); }
  .mobile-menu__sheet { display: grid; gap: var(--s-4); padding: var(--s-6) var(--s-5) var(--s-5); border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line-2); transform: translateY(24px); transition: transform var(--t-base) var(--ease-out); }
  .mobile-menu.is-open .mobile-menu__sheet { transform: none; }
  .mobile-menu a.big { font-size: 2.1rem; }
  .mobile-menu .close { position: static; justify-self: end; order: 99; width: 58px; height: 58px; background: var(--surface-2); }
  .mobile-menu .btn { margin-top: var(--s-2) !important; }
}

/* ---------- Video tile v2: Play in the site ---------- */
.vtile { position: relative; }
.vtile__thumb { position: relative; }
.vtile__play { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }
.vtile__play img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out), filter var(--t-base); }
.vtile__play:hover img, .vtile__play:focus-visible img { transform: scale(1.04); filter: brightness(.85); }
.vtile__title { font: inherit; }
.vtile__title button { text-align: left; font-size: var(--fs-sm); line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vtile__title button:hover { color: var(--moon); }
.vtile .vcard__meta { flex-wrap: wrap; }
.vtile__actions { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }

/* Play badge (primary action) */
.play-badge { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: rgba(15, 13, 11, .72); backdrop-filter: blur(6px); box-shadow: 0 0 0 1px rgba(236,223,198,.25);
  transition: transform var(--t-base) var(--ease-out), background var(--t-base); }
.play-badge::after { content: ""; position: absolute; left: 21px; top: 17px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent var(--moon); }
.play-badge--lg { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
.play-badge--lg::after { left: 29px; top: 24px; border-width: 12px 0 12px 19px; }
.play-badge--sm { width: 34px; height: 34px; margin: -17px 0 0 -17px; }
.play-badge--sm::after { left: 13px; top: 10px; border-width: 7px 0 7px 11px; }
.vtile__play:hover .play-badge, .latest .vtile__play:hover .play-badge { transform: scale(1.1); background: var(--moon); }
.vtile__play:hover .play-badge::after { border-left-color: var(--on-moon); }

/* Player frame (inline) */
[data-frame].has-player { background: #000; }
[data-frame] iframe, .pdialog__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pinline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding-top: var(--s-3); }
.pinline .pclose { margin-left: auto; }

/* Secondary actions */
.pactions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.pbtn { display: inline-flex; align-items: center; gap: .45em; min-height: 36px; padding: 0 .9em; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); font-size: var(--fs-xs); color: var(--text-2); white-space: nowrap; transition: all var(--t-base); }
.pbtn:hover { color: var(--text); border-color: var(--text-3); }
.pbtn[aria-pressed="true"] { color: var(--moon); border-color: color-mix(in srgb, var(--moon) 45%, transparent); }
.pbtn .heart { font-size: 1.05em; line-height: 1; }
.pbtn--icon { min-height: 30px; width: 30px; padding: 0; justify-content: center; border-color: transparent; }
.pbtn--icon:hover { border-color: var(--line-2); }
.plink { font-size: var(--fs-xs); color: var(--text-3); padding: 0 .4em; transition: color var(--t-base); }
.plink:hover { color: var(--moon); }
.pclose { min-height: 36px; padding: 0 .9em; border-radius: var(--r-pill); font-size: var(--fs-xs); color: var(--text-2); border: 1px solid var(--line-2); }
.pclose:hover { color: var(--text); border-color: var(--text-3); }

/* Dialog player (Pomodoro Finder, Learn, /go) */
.pdialog { width: min(1040px, calc(100vw - 24px)); max-width: none; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-xl);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); overflow: hidden; }
.pdialog::backdrop { background: rgba(8, 6, 5, .78); backdrop-filter: blur(6px); }
.pdialog[open] { animation: pdIn var(--t-base) var(--ease-out); }
@keyframes pdIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.pdialog__top { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-5); }
.pdialog__title { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdialog .pdialog__top .pclose { width: 40px; padding: 0; justify-content: center; display: grid; place-items: center; }
.pdialog__frame { position: relative; aspect-ratio: 16/9; background: #000; }
.pdialog__meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); }
.pdialog__meta .vcard__meta { margin: 0; }
html.has-dialog { overflow: hidden; }

/* Thumbnail that failed to load → designed poster, never a broken icon */
.thumb-poster { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px;
  background: radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--dot) 55%, #2a221b), #16120f 75%); }
.thumb-poster b { font-family: var(--font-mono); font-weight: 400; font-size: clamp(1.4rem, 1rem + 2vw, 2.2rem); color: var(--text); letter-spacing: -.02em; }
.thumb-poster small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.vcard__thumb, .go-quick__thumb { position: relative; }

/* ---------- From the comments ---------- */
.quotes { display: grid; gap: var(--s-4); overflow: hidden; mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.quotes__track { display: flex; gap: var(--s-4); width: max-content; will-change: transform; }
.quotes__row { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.quotes__row.is-dragging { cursor: grabbing; }
@keyframes marquee { to { transform: translateX(-50%); } }
.quotes__toggle { display: inline-flex; align-items: center; gap: .5em; min-height: 36px; padding: 0 .9em; border-radius: var(--r-pill); border: 1px solid var(--line-2); font-size: var(--fs-xs); color: var(--text-2); }
.quotes__toggle:hover { color: var(--text); border-color: var(--text-3); }
.quote { margin: 0; width: min(78vw, 360px); flex: none; display: grid; gap: var(--s-4); align-content: space-between; padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.quote blockquote { margin: 0; font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.4; color: var(--text); }
.quote blockquote::before { content: "“"; color: var(--moon); }
.quote blockquote::after { content: "”"; color: var(--moon); }
.quotes__foot { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; margin-top: var(--s-6); }
.latest__actions { margin-top: var(--s-2); }
.latest.is-playing .pinline { padding: var(--s-3) var(--s-5) 0; }
.picker__list .vtile { margin: 0; padding: 0; }

.quote { align-content: start; }
.quote__head { display: flex; align-items: center; gap: var(--s-3); }
.quote__avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover; display: grid; place-items: center;
  font-size: 13px; font-weight: 500; color: var(--text); background: hsl(var(--h, 30) 22% 26%); box-shadow: 0 0 0 1px var(--line-2); }
.quote__id { display: grid; gap: 2px; min-width: 0; }
.quote__who { font-size: var(--fs-sm); font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote__platform { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-3); }
.quote__platform i { width: 7px; height: 7px; border-radius: 50%; background: var(--pc); }

/* Stats, two-panel grid, community list (Home + About) */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-5) var(--s-4); }
.stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-3xl); line-height: 1; }
.stat span { font-size: var(--fs-xs); color: var(--text-3); }
.close__grid { display: grid; gap: var(--s-4); }
@media (min-width: 1000px) { .close__grid { grid-template-columns: 1.2fr .8fr; } }
.community-list { display: grid; }
.community-list a { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); transition: color var(--t-base), padding var(--t-base) var(--ease-out); }
.community-list a:hover { color: var(--moon); padding-left: 6px; }
.community-list small { color: var(--text-3); font-size: var(--fs-xs); }

/* Volume slider next to the player (always visible, easy to grab) */
.pvol { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 .9em 0 .75em; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--text-2); }
.pvol svg { width: 16px; height: 16px; flex: none; }
.pvol input { -webkit-appearance: none; appearance: none; width: 110px; height: 4px; border-radius: 4px; cursor: pointer;
  background: linear-gradient(90deg, var(--moon) var(--fill, 50%), var(--line-2) var(--fill, 50%)); }
.pvol input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--moon); box-shadow: 0 0 0 4px rgba(236,223,198,.12); }
.pvol input::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--moon); }
.pvol:hover { border-color: var(--text-3); color: var(--text); }

/* ---------- Email + community panels on small screens ---------- */
@media (max-width: 560px) {
  .field { flex-direction: column; border-radius: var(--r-lg); padding: 6px; }
  .field input { min-height: 48px; padding: 0 var(--s-3); }
  .field .btn { width: 100%; justify-content: center; }
  .panel { padding: var(--s-5); }
}
