/* ============================================================================
   Daily Junction — installable app core stylesheet
   The web analog of `dj-android-core`: one design system shared by the DJ Now,
   DJPlay and DJ Arcade installable apps. Tokens, brand bar, bottom nav and
   cards are a faithful port of the native Android apps (colors.xml / themes.xml
   / the item_*.xml layouts) — NOT the dailyjunction.org website chrome.
   Light-chrome product, one theme, no dark variant (matches the native app).
   ========================================================================= */

:root {
  /* Brand — pulled verbatim from the native app colors.xml. */
  --dj-blue: #1257A5;
  --dj-blue-dark: #0E4684;
  --dj-red: #E8401F;
  --dj-gold: #F6A800;
  --dj-bg: #F4F5F7;
  --dj-ink: #15171C;
  --dj-soft: #5B6470;
  --dj-line: #E3E5E8;
  --dj-staff: #EEF4FB;
  --dj-white: #FFFFFF;

  /* Per-app accent — overridden by each app (DJPlay/Arcade tint chrome). */
  --dj-accent: var(--dj-blue);
  --dj-accent-dark: var(--dj-blue-dark);

  --dj-card-radius: 18px;
  --dj-elev-1: 0 1px 2px rgba(21, 23, 28, .04), 0 4px 12px rgba(21, 23, 28, .05);
  --dj-elev-2: 0 6px 22px rgba(21, 23, 28, .12);
  --dj-elev-nav: 0 -1px 0 var(--dj-line), 0 -6px 18px rgba(21, 23, 28, .04);

  /* Safe-area insets — the web equivalent of the native Insets.kt edge-to-edge
     handling. Keeps chrome clear of the iPhone notch + home indicator. */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --brandbar-h: 58px;
  --bottomnav-h: 58px;

  --dj-serif: Georgia, 'Times New Roman', 'Noto Serif', serif;
  --dj-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--dj-bg);
  color: var(--dj-ink);
  font-family: var(--dj-sans);
  font-size: 16px;
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}
body { overflow: hidden; }
button { font-family: inherit; cursor: pointer; }
img { display: block; }
a { color: var(--dj-accent); text-decoration: none; }

/* App shell: fixed brand bar + scrolling screen host + fixed bottom nav.
   On desktop/tablet we frame the phone-width app centered on a soft backdrop. */
#dj-app {
  display: flex; flex-direction: column;
  height: 100dvh; max-width: 560px; margin: 0 auto;
  background: var(--dj-bg);
  position: relative; overflow: hidden;
}
@media (min-width: 620px) {
  body { background: #E7EAF0; }
  #dj-app { box-shadow: 0 0 0 1px var(--dj-line), 0 30px 80px rgba(21,23,28,.18); }
}

/* ---- Brand bar ---------------------------------------------------------- */
.dj-brandbar {
  flex: 0 0 auto;
  padding-top: var(--safe-top);
  background: var(--dj-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(14, 70, 132, .28);
  z-index: 20;
}
.dj-brandbar__row {
  min-height: 60px;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 16px 10px;
}
.dj-brandbar__mark {
  width: 36px; height: 36px; border-radius: 9px; flex: 0 0 auto;
  background: #fff; padding: 3px; object-fit: contain;
  box-shadow: 0 1px 2px rgba(0,0,0,.16);
}
.dj-brandbar__titles { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.dj-brandbar__name {
  font-family: var(--dj-serif); font-weight: 700; font-size: 20px; line-height: 1.15;
  letter-spacing: -.02em; color: #fff; display: block;
}
.dj-brandbar__tag {
  font-size: 11.5px; line-height: 1.3; color: rgba(255,255,255,.75); display: block; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dj-brandbar__live { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.dj-brandbar__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--dj-red);
  box-shadow: 0 0 0 0 rgba(232,64,31,.6); animation: dj-pulse 2s infinite;
}
.dj-brandbar__live b { font-size: 11px; letter-spacing: .04em; }
@keyframes dj-pulse {
  0% { box-shadow: 0 0 0 0 rgba(232,64,31,.55); }
  70% { box-shadow: 0 0 0 7px rgba(232,64,31,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,64,31,0); }
}

/* ---- Screen host -------------------------------------------------------- */
.dj-host { flex: 1 1 auto; position: relative; overflow: hidden; }
.dj-screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.dj-screen[hidden] { display: none; }
.dj-scroll {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 14px;
}

/* ---- Search + chips ----------------------------------------------------- */
.dj-search {
  margin: 14px 14px 2px; height: 46px; width: calc(100% - 28px);
  border: 1px solid var(--dj-line); border-radius: 13px; background: #fff;
  padding: 0 16px; font-size: 15px; color: var(--dj-ink);
  outline: none; transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(21,23,28,.04);
}
.dj-search::placeholder { color: var(--dj-soft); }
.dj-search:focus { border-color: var(--dj-accent); box-shadow: 0 0 0 3px rgba(18,87,165,.12); }
.dj-chiprow {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 12px 14px 4px; flex: 0 0 auto;
}
.dj-chiprow::-webkit-scrollbar { display: none; }
.dj-chip {
  flex: 0 0 auto; border: 1px solid var(--dj-line); background: #fff;
  color: var(--dj-soft); border-radius: 999px; padding: 7px 14px;
  font-size: 13px; font-weight: 600; white-space: nowrap; transition: all .12s;
}
.dj-chip[aria-selected="true"] {
  background: var(--dj-accent); border-color: var(--dj-accent); color: #fff;
}

/* ---- Grids + cards ------------------------------------------------------ */
.dj-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 12px; align-content: start;
}
@media (min-width: 480px) { .dj-grid { grid-template-columns: 1fr 1fr 1fr; } }
.dj-card {
  background: #fff; border: 1px solid var(--dj-line);
  border-radius: var(--dj-card-radius); overflow: hidden;
  box-shadow: var(--dj-elev-1); transition: transform .12s, box-shadow .12s;
  cursor: pointer; display: flex; flex-direction: column;
}
.dj-card:active { transform: scale(.975); }
.dj-card__thumb {
  position: relative; background: linear-gradient(135deg, #f0f2f5, #e6eaef);
  aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center;
}
.dj-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.dj-card__thumb.is-logo img { width: 64px; height: 52px; object-fit: contain; }
.dj-card__emoji { font-size: 30px; }
.dj-card__body { padding: 11px 12px 12px; }
.dj-card__title {
  font-size: 14.5px; font-weight: 750; color: var(--dj-ink); letter-spacing: -.012em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dj-card__meta {
  font-size: 12px; color: var(--dj-soft); margin-top: 3px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dj-badge-live {
  position: absolute; top: 8px; left: 8px;
  background: var(--dj-red); color: #fff; font-size: 9.5px; font-weight: 700;
  letter-spacing: .03em; padding: 2px 6px; border-radius: 5px;
}
.dj-fav {
  position: absolute; top: 4px; right: 4px; font-size: 17px; line-height: 1;
  color: #fff; padding: 8px; text-shadow: 0 1px 4px rgba(0,0,0,.5);
  background: none; border: 0;
}
.dj-fav.is-on { color: var(--dj-gold); }

/* ---- News article cards (single column) --------------------------------- */
.dj-list { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.dj-article {
  background: #fff; border: 1px solid var(--dj-line); border-radius: 18px;
  overflow: hidden; box-shadow: var(--dj-elev-1); cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
}
.dj-article:active { transform: scale(.985); box-shadow: var(--dj-elev-2); }
.dj-article__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #eef1f4; }
.dj-article__body { padding: 15px 16px 16px; }
.dj-article__head { display: flex; align-items: center; gap: 9px; }
.dj-tag {
  font-size: 10px; font-weight: 800; color: #fff; padding: 3.5px 8px;
  border-radius: 6px; background: var(--dj-red); text-transform: uppercase;
  letter-spacing: .055em; white-space: nowrap; line-height: 1;
}
.dj-article__metatext { flex: 1 1 auto; font-size: 12px; color: var(--dj-soft); font-weight: 500; letter-spacing: .005em; }
.dj-article__save { font-size: 19px; color: var(--dj-line); background: none; border: 0; padding: 2px 4px; line-height: 1; transition: color .12s; }
.dj-article__save.is-on { color: var(--dj-gold); }
.dj-article__title {
  font-size: 18px; font-weight: 800; margin: 10px 0 0; line-height: 1.26;
  letter-spacing: -.021em; color: var(--dj-ink);
}
.dj-article__excerpt {
  font-size: 14px; color: var(--dj-soft); margin-top: 6px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dj-breaking {
  display: inline-block; background: var(--dj-red); color: #fff; font-weight: 800;
  font-size: 10px; letter-spacing: .06em; padding: 2px 7px; border-radius: 5px; margin-right: 6px;
  vertical-align: 2px;
}

/* ---- Bottom nav --------------------------------------------------------- */
.dj-bottomnav {
  flex: 0 0 auto; display: flex; background: #fff;
  box-shadow: var(--dj-elev-nav);
  padding-bottom: var(--safe-bottom); z-index: 20;
}
.dj-navbtn {
  flex: 1 1 0; border: 0; background: none; color: var(--dj-soft);
  height: var(--bottomnav-h); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; position: relative;
  font-size: 11px; font-weight: 600; transition: color .12s;
}
.dj-navbtn svg { width: 24px; height: 24px; stroke-width: 2; }
.dj-navbtn__pill {
  position: absolute; top: 8px; width: 44px; height: 30px; border-radius: 999px;
  background: rgba(18, 87, 165, .10); opacity: 0; transform: scaleX(.6); transition: .16s;
}
.dj-navbtn[aria-selected="true"] { color: var(--dj-accent); }
.dj-navbtn[aria-selected="true"] .dj-navbtn__pill { opacity: 1; transform: scaleX(1); }

/* ---- Overlays (player / game / article / sheet) ------------------------- */
.dj-overlay {
  position: fixed; inset: 0; z-index: 60; background: var(--dj-bg);
  display: flex; flex-direction: column; max-width: 560px; margin: 0 auto;
  animation: dj-slideup .22s ease;
}
@keyframes dj-slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
.dj-overlay--dark { background: #000; }
.dj-overlay__bar {
  flex: 0 0 auto; padding-top: var(--safe-top);
  background: var(--dj-accent); color: #fff; display: flex; align-items: center; gap: 6px;
}
.dj-overlay__bar.is-dark { background: #0b0b0d; }
.dj-overlay__bar-inner { height: 52px; display: flex; align-items: center; gap: 8px; width: 100%; padding: 0 6px 0 4px; }
.dj-iconbtn {
  background: none; border: 0; color: inherit; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; border-radius: 50%;
}
.dj-iconbtn:active { background: rgba(255,255,255,.15); }
.dj-overlay__title { flex: 1 1 auto; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dj-overlay__body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ---- Video player (our own skin over the HLS/.m3u8 stream) --------------- */
.dj-vp { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; flex: 0 0 auto; }
.dj-vp:fullscreen { aspect-ratio: auto; height: 100%; }
.dj-player-video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #000; object-fit: contain; }

.dj-vp__buffer { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; pointer-events: none; z-index: 3; }
.dj-vp.is-buffering .dj-vp__buffer { display: flex; }
.dj-vp__buffer .dj-spinner { margin: 0; border-color: rgba(255,255,255,.28); border-top-color: #fff; }

.dj-vp__center {
  position: absolute; inset: 0; margin: auto; width: 66px; height: 66px; border-radius: 50%;
  background: rgba(0,0,0,.48); border: 0; color: #fff; display: none; align-items: center; justify-content: center;
  z-index: 4; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.dj-vp__center svg { width: 30px; height: 30px; margin-left: 3px; }
.dj-vp.is-paused .dj-vp__center { display: flex; }

.dj-vp__bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: 3px; padding: 22px 8px 9px;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.dj-vp.is-active .dj-vp__bar, .dj-vp.is-paused .dj-vp__bar { opacity: 1; transform: none; }
.dj-vp__b { background: none; border: 0; color: #fff; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; border-radius: 9px; flex: 0 0 auto; }
.dj-vp__b:active { background: rgba(255,255,255,.16); }
.dj-vp__b svg { width: 22px; height: 22px; }
.dj-vp__sp { flex: 1 1 auto; }
.dj-vp__live { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .04em; padding: 8px; }
.dj-vp__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dj-red); }
.dj-vp.is-behind .dj-vp__dot { background: #9aa3ad; }
.dj-vp.is-behind .dj-vp__live { color: #cfd4da; }
.dj-vp__mid { flex: 1 1 auto; display: flex; align-items: center; gap: 9px; padding: 0 6px; }
.dj-vp__scrub { flex: 1 1 auto; accent-color: var(--dj-red); height: 4px; }
.dj-vp__time { font-size: 11.5px; color: #dfe3e8; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dj-player-meta { padding: 12px 14px; background: #fff; border-bottom: 1px solid var(--dj-line); }
.dj-player-now { font-size: 12px; color: var(--dj-soft); }
.dj-player-now b { color: var(--dj-ink); }
.dj-player-actions { display: flex; gap: 8px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--dj-line); }
.dj-actbtn {
  flex: 1 1 0; border: 1px solid var(--dj-line); background: #fff; color: var(--dj-ink);
  border-radius: 10px; padding: 9px 6px; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.dj-actbtn.is-on { color: var(--dj-gold); border-color: var(--dj-gold); }
.dj-actbtn.is-liked { color: var(--dj-blue); border-color: var(--dj-blue); }
.dj-watching { text-align: center; font-size: 12px; color: var(--dj-soft); padding: 6px; background: #fff; }

.dj-tabs { display: flex; background: #fff; border-bottom: 1px solid var(--dj-line); position: sticky; top: 0; z-index: 2; }
.dj-tab {
  flex: 1 1 0; border: 0; background: none; padding: 12px 4px; font-size: 13.5px; font-weight: 600;
  color: var(--dj-soft); border-bottom: 2.5px solid transparent;
}
.dj-tab[aria-selected="true"] { color: var(--dj-accent); border-bottom-color: var(--dj-accent); }

/* ---- Chat + comments ---------------------------------------------------- */
.dj-thread { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.dj-msg { display: flex; gap: 9px; }
.dj-msg__av {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.dj-msg__bubble { background: #fff; border: 1px solid var(--dj-line); border-radius: 12px; padding: 8px 11px; flex: 1 1 auto; }
.dj-msg__bubble.is-host { background: var(--dj-staff); border-color: #d6e4f5; }
.dj-msg__name { font-size: 12.5px; font-weight: 700; color: var(--dj-ink); }
.dj-msg__host-chip { font-size: 9.5px; font-weight: 700; color: var(--dj-blue); border: 1px solid #cfe0f4; border-radius: 4px; padding: 0 4px; margin-left: 6px; vertical-align: middle; }
.dj-msg__body { font-size: 14px; color: var(--dj-ink); margin-top: 2px; line-height: 1.35; word-break: break-word; }
.dj-msg__time { font-size: 11px; color: var(--dj-soft); margin-top: 3px; }
.dj-composer {
  flex: 0 0 auto; display: flex; gap: 8px; padding: 10px 12px; background: #fff;
  border-top: 1px solid var(--dj-line); padding-bottom: calc(10px + var(--safe-bottom));
}
.dj-composer input {
  flex: 1 1 auto; border: 1px solid var(--dj-line); border-radius: 999px; padding: 10px 15px;
  font-size: 14px; outline: none; min-width: 0;
}
.dj-composer input:focus { border-color: var(--dj-accent); }
.dj-composer .dj-name { flex: 0 0 34%; }
.dj-send {
  flex: 0 0 auto; background: var(--dj-accent); color: #fff; border: 0; border-radius: 999px;
  padding: 0 18px; font-weight: 700; font-size: 14px;
}
.dj-send:disabled { opacity: .5; }
.dj-note { font-size: 11.5px; color: var(--dj-soft); text-align: center; padding: 4px 12px; }

/* ---- Buttons / primary -------------------------------------------------- */
.dj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--dj-accent); color: #fff; border: 0; border-radius: 12px;
  padding: 13px 18px; font-size: 15px; font-weight: 700; width: 100%;
}
.dj-btn:active { filter: brightness(.94); }
.dj-btn--ghost { background: #fff; color: var(--dj-accent); border: 1.5px solid var(--dj-line); }
.dj-btn:disabled { opacity: .5; }

/* ---- Panels / About / Support ------------------------------------------- */
.dj-pad { padding: 16px; }
.dj-panel { background: #fff; border: 1px solid var(--dj-line); border-radius: 14px; padding: 16px; box-shadow: var(--dj-elev-1); }
.dj-panel + .dj-panel { margin-top: 12px; }
.dj-h { font-size: 15px; font-weight: 800; margin: 0 0 4px; }
.dj-sub { font-size: 13.5px; color: var(--dj-soft); line-height: 1.5; margin: 0; }
.dj-field { width: 100%; border: 1px solid var(--dj-line); border-radius: 10px; padding: 12px 14px; font-size: 15px; margin-top: 10px; outline: none; background: #fff; }
.dj-field:focus { border-color: var(--dj-accent); }
textarea.dj-field { min-height: 110px; resize: vertical; font-family: inherit; }
.dj-linkrow { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-top: 1px solid var(--dj-line); font-size: 15px; color: var(--dj-ink); font-weight: 600; }
.dj-linkrow:first-of-type { border-top: 0; }
.dj-linkrow span:last-child { margin-left: auto; color: var(--dj-soft); }

/* ---- Leaderboard -------------------------------------------------------- */
.dj-lb-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border-bottom: 1px solid var(--dj-line); }
.dj-lb-rank { font-size: 15px; font-weight: 800; width: 30px; text-align: center; color: var(--dj-soft); }
.dj-lb-rank.top { color: var(--dj-gold); }
.dj-lb-name { flex: 1 1 auto; font-weight: 700; font-size: 14.5px; }
.dj-lb-plays { font-size: 12px; color: var(--dj-soft); font-weight: 400; }
.dj-lb-pts { font-weight: 800; color: var(--dj-accent); font-size: 14px; }

/* ---- Empty / error / loading ------------------------------------------- */
.dj-empty { text-align: center; color: var(--dj-soft); font-size: 14.5px; padding: 40px 28px; line-height: 1.5; }
.dj-empty__ico { font-size: 34px; margin-bottom: 10px; opacity: .5; }
.dj-spinner {
  width: 30px; height: 30px; margin: 40px auto; border-radius: 50%;
  border: 3px solid var(--dj-line); border-top-color: var(--dj-accent); animation: dj-spin .8s linear infinite;
}
@keyframes dj-spin { to { transform: rotate(360deg); } }
.dj-skel { background: linear-gradient(90deg, #eef0f3 25%, #e3e6ea 50%, #eef0f3 75%); background-size: 200% 100%; animation: dj-shimmer 1.3s infinite; border-radius: 12px; }
@keyframes dj-shimmer { to { background-position: -200% 0; } }

/* ---- Toast + update banner ---------------------------------------------- */
.dj-toast {
  position: fixed; left: 50%; bottom: calc(78px + var(--safe-bottom)); transform: translateX(-50%);
  background: var(--dj-ink); color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; z-index: 90; box-shadow: var(--dj-elev-2);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap; max-width: 90vw;
}
.dj-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.dj-update {
  position: fixed; left: 12px; right: 12px; bottom: calc(74px + var(--safe-bottom));
  max-width: 536px; margin: 0 auto; background: var(--dj-accent); color: #fff;
  border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--dj-elev-2); z-index: 80;
}
.dj-update b { font-size: 14px; } .dj-update p { margin: 1px 0 0; font-size: 12px; opacity: .85; }
.dj-update button { margin-left: auto; background: #fff; color: var(--dj-accent); border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 13px; }

/* ---- iOS install hint sheet --------------------------------------------- */
.dj-scrim { position: fixed; inset: 0; background: rgba(10,12,16,.55); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: dj-fade .2s; }
@keyframes dj-fade { from { opacity: 0; } }
.dj-sheet {
  background: #fff; width: 100%; max-width: 560px; border-radius: 20px 20px 0 0;
  padding: 20px 20px calc(22px + var(--safe-bottom)); animation: dj-slideup .26s ease;
}
.dj-sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--dj-line); margin: -6px auto 14px; }
.dj-sheet h3 { margin: 0 0 4px; font-size: 18px; }
.dj-sheet ol { margin: 14px 0 0; padding-left: 4px; list-style: none; }
.dj-sheet li { display: flex; gap: 12px; align-items: center; padding: 10px 0; font-size: 15px; border-top: 1px solid var(--dj-line); }
.dj-sheet li b { display: inline-flex; }
.dj-sheet__step { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--dj-accent); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* iframe surfaces (games, article reader) */
.dj-frame { width: 100%; height: 100%; border: 0; background: #000; }
.dj-frame--light { background: #fff; }
.dj-frameHost { flex: 1 1 auto; position: relative; background: #000; }

/* ---- Shorts: native vertical YouTube feed ------------------------------- */
.dj-shorts {
  height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch; background: #000; scrollbar-width: none;
}
.dj-shorts::-webkit-scrollbar { display: none; }
.dj-short {
  position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden;
}
.dj-short__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dj-short iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1; }
.dj-short__sound {
  position: absolute; z-index: 3; top: 14px; right: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.35); color: #fff;
  font-size: 12.5px; font-weight: 700; padding: 7px 13px; border-radius: 999px;
}
.dj-short__sound:active { transform: scale(.94); }
.dj-short__pp {
  position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; z-index: 3;
  border-radius: 50%; background: rgba(0,0,0,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; color: #fff; pointer-events: auto;
}
.dj-short__pp svg { width: 30px; height: 30px; margin-left: 3px; }
.dj-short.is-paused .dj-short__pp { display: flex; }
.dj-short__prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3; background: rgba(255,255,255,.22); }
.dj-short__prog i { display: block; height: 100%; width: 0; background: var(--dj-red); transition: width .25s linear; }
.dj-short__meta {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none;
  padding: 26px 18px calc(22px + var(--safe-bottom)); color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.35) 40%, rgba(0,0,0,.82));
}
.dj-short__ch { font-size: 12.5px; font-weight: 700; opacity: .9; display: flex; align-items: center; gap: 6px; }
.dj-short__ch::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dj-red); }
.dj-short__title {
  font-size: 15.5px; font-weight: 700; margin-top: 5px; line-height: 1.32; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dj-short__hint { position: absolute; top: 12px; right: 14px; z-index: 2; color: rgba(255,255,255,.6); font-size: 11px; font-weight: 600; }

/* ---- On This Day (News tab strip) --------------------------------------- */
.dj-otd-slot { margin: 4px 0 2px; }
.dj-otd { padding: 4px 0 10px; }
.dj-otd__head { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; color: var(--dj-ink); padding: 2px 16px 8px; letter-spacing: .01em; }
.dj-otd__cal { font-size: 14px; }
.dj-otd__rail { display: flex; gap: 12px; overflow-x: auto; padding: 2px 16px 6px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.dj-otd__rail::-webkit-scrollbar { display: none; }
.dj-otd__card { flex: 0 0 190px; scroll-snap-align: start; background: #fff; border: 1px solid var(--dj-line); border-radius: 14px; overflow: hidden; box-shadow: var(--dj-elev-1); cursor: pointer; display: flex; flex-direction: column; }
.dj-otd__card:active { transform: scale(.98); }
.dj-otd__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--dj-staff); }
.dj-otd__cbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.dj-otd__year { font-size: 11px; font-weight: 800; color: var(--dj-accent); text-transform: uppercase; letter-spacing: .03em; }
.dj-otd__title { font-size: 13.5px; font-weight: 700; line-height: 1.3; color: var(--dj-ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dj-otd__card--event { background: var(--dj-staff); border-color: #d9e4f2; }
.dj-otd__card--event .dj-otd__year { color: var(--dj-blue-dark); }
.dj-otd__title--event { font-weight: 600; -webkit-line-clamp: 4; }

/* ---- More from Daily Junction (About cross-promo) ----------------------- */
.dj-promos__head { font-size: 13px; font-weight: 800; color: var(--dj-soft); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.dj-promo { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-top: 1px solid var(--dj-line); cursor: pointer; }
.dj-promo:active { opacity: .6; }
.dj-promo__body { flex: 1 1 auto; min-width: 0; }
.dj-promo__eyebrow { font-size: 10.5px; font-weight: 800; color: var(--dj-accent); text-transform: uppercase; letter-spacing: .04em; }
.dj-promo__title { font-size: 14.5px; font-weight: 700; color: var(--dj-ink); margin: 1px 0; }
.dj-promo__blurb { font-size: 12.5px; color: var(--dj-soft); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dj-promo__cta { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; color: var(--dj-accent); white-space: nowrap; }

/* ---- Toggle switch (notifications) -------------------------------------- */
.dj-switch { margin-left: auto; width: 42px; height: 25px; border-radius: 999px; background: var(--dj-line); position: relative; transition: background .18s ease; flex: 0 0 auto; }
.dj-switch.is-on { background: var(--dj-accent); }
.dj-switch__dot { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s ease; }
.dj-switch.is-on .dj-switch__dot { transform: translateX(17px); }

/* ---- Native article reader (app-article) -------------------------------- */
.dj-read { padding: 0 0 32px; }
.dj-read__img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--dj-line); }
.dj-read__meta { color: var(--dj-soft); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; margin: 16px 16px 0; }
.dj-read__title { font-size: 25px; line-height: 1.2; font-weight: 800; color: var(--dj-ink); margin: 8px 16px 0; }
.dj-read__byline { color: var(--dj-soft); font-size: 13.5px; margin: 8px 16px 0; }
.dj-read__tldrbox { margin: 16px; padding: 14px 16px; background: color-mix(in srgb, var(--dj-blue) 6%, #fff); border: 1px solid color-mix(in srgb, var(--dj-blue) 18%, var(--dj-line)); border-radius: 14px; }
.dj-read__tldrhead { font-weight: 800; color: var(--dj-blue-dark); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 8px; }
.dj-read__tldr { margin: 0; padding-left: 18px; color: var(--dj-ink); font-size: 14.5px; line-height: 1.55; }
.dj-read__tldr li { margin: 4px 0; }
.dj-read__body { margin: 18px 16px 0; color: var(--dj-ink); font-size: 16.5px; line-height: 1.7; }
.dj-read__body p { margin: 0 0 16px; }
.dj-read__body h2, .dj-read__body h3 { line-height: 1.3; margin: 24px 0 10px; font-weight: 800; }
.dj-read__body h2 { font-size: 21px; }
.dj-read__body h3 { font-size: 18px; }
.dj-read__body a { color: var(--dj-blue); text-decoration: underline; }
.dj-read__body img { max-width: 100%; height: auto; border-radius: 10px; margin: 8px 0; }
.dj-read__body ul, .dj-read__body ol { padding-left: 22px; margin: 0 0 16px; }
.dj-read__body li { margin: 6px 0; }
.dj-read__body blockquote { margin: 16px 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--dj-accent); color: var(--dj-soft); }
.dj-read__h { font-size: 15px; font-weight: 800; color: var(--dj-ink); text-transform: uppercase; letter-spacing: .03em; margin: 24px 16px 10px; }
.dj-read__sources { margin: 0 16px; padding-left: 18px; color: var(--dj-soft); font-size: 14px; line-height: 1.5; }
.dj-read__sources a { color: var(--dj-blue); }
.dj-read__related { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px; }
.dj-relcard { display: flex; flex-direction: column; text-align: left; background: #fff; border: 1px solid var(--dj-line); border-radius: 12px; overflow: hidden; padding: 0; cursor: pointer; font: inherit; }
.dj-relcard__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--dj-line); }
.dj-relcard__t { padding: 9px 11px; font-size: 13.5px; font-weight: 700; color: var(--dj-ink); line-height: 1.3; }
.dj-relcard:active { transform: scale(.98); }
