/* ==========================================================================
   Las Milpitas — "YouTube Kids" app layer (v2.0). Loads after categories.css.
   ========================================================================== */
:root { --lm-header-h: 190px; --ytk-tap: 48px; --ytk-r: 24px; }

/* ---- chrome: papel picado strip + bar + category tabs + subrow ---------- */
.lm-chrome { box-shadow: 0 6px 18px rgba(89,53,16,.14); }
.lm-chrome .lm-papel { height: 18px; background-size: auto 18px; }
.ytk-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  max-width: 1400px; margin: 0 auto; padding: 4px 20px 6px;
}
.ytk-bar .lm-logo img { height: 62px; width: auto; max-width: 160px; }
.ytk-bar-actions { display: flex; align-items: center; gap: 8px; }
.ytk-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--ytk-tap); min-width: var(--ytk-tap); padding: 0 16px;
  border: 3px solid var(--lm-ink); border-radius: 999px; background: var(--lm-white);
  color: var(--lm-ink) !important; font: 800 1rem/1 var(--font-display); text-decoration: none !important;
  cursor: pointer; box-shadow: 0 4px 0 var(--lm-ink); transition: transform .12s ease, box-shadow .12s ease;
}
.ytk-iconbtn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--lm-ink); }
.ytk-iconbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--lm-ink); }
.ytk-iconbtn svg { flex: none; }
.ytk-iconbtn-text { display: inline-flex; flex-direction: column; text-align: left; line-height: 1.05; }
.ytk-iconbtn-text i { font: 700 .68rem var(--font-body); opacity: .75; font-style: normal; }
.ytk-channel { background: #fff; }
.ytk-channel svg { color: #E23D28; }
.ytk-shop { background: var(--lm-chile); color: #fff !important; border-color: var(--lm-chile-deep); box-shadow: 0 4px 0 var(--lm-chile-deep); }
.ytk-shop:hover { box-shadow: 0 6px 0 var(--lm-chile-deep); }
.ytk-search-toggle { background: var(--lm-sun); }

/* category tabs */
.ytk-tabs { background: linear-gradient(#FFE9A8, var(--lm-cream)); border-top: 3px solid rgba(89,53,16,.08); }
.ytk-tabs ul {
  list-style: none; margin: 0 auto; padding: 8px 20px 10px; max-width: 1400px;
  display: flex; gap: 10px; justify-content: safe center; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ytk-tabs ul::-webkit-scrollbar { display: none; }
.ytk-tabs li { flex: 0 0 auto; scroll-snap-align: center; margin: 0; }
.ytk-tab {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 6px 20px 6px 8px;
  border-radius: 22px; border: 3px solid transparent; color: #fff !important; text-decoration: none !important;
  background: var(--tab, var(--lm-marigold)); box-shadow: 0 5px 0 var(--tab-deep, var(--lm-marigold-deep));
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.ytk-tab:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--tab-deep, var(--lm-marigold-deep)); }
.ytk-tab-icon {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,.28); color: #fff; flex: none;
}
.ytk-tab-icon svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.18)); }
.ytk-tab-label { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.ytk-tab-label b { font: 800 1.25rem var(--font-display); letter-spacing: .01em; text-shadow: 0 2px 0 rgba(0,0,0,.18); }
.ytk-tab-label i { font: 700 .78rem var(--font-body); font-style: normal; opacity: .95; }
.ytk-tab--all        { --tab: var(--lm-chile);     --tab-deep: var(--lm-chile-deep); }
.ytk-tab--christmas  { --tab: #2F9E5B;             --tab-deep: #1E7440; }
.ytk-tab--decorating { --tab: var(--lm-marigold);  --tab-deep: var(--lm-marigold-deep); }
.ytk-tab--organize   { --tab: var(--lm-nopal);     --tab-deep: var(--lm-nopal-deep); }
.ytk-tab--puzzle     { --tab: var(--lm-turquoise); --tab-deep: var(--lm-turquoise-deep); }
.ytk-tab--adventure  { --tab: #EF7DA0;             --tab-deep: #C4577C; }
.ytk-tab-badge {
  position: absolute; top: -9px; right: -6px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--lm-corn); color: var(--lm-chile-deep); display: grid; place-items: center; font-size: 15px;
  border: 2px solid #fff; box-shadow: 0 2px 0 rgba(0,0,0,.2);
}
.ytk-tab.is-active {
  background: var(--lm-white); color: var(--tab-deep) !important; border-color: var(--tab);
  transform: translateY(-2px); box-shadow: 0 7px 0 var(--tab), 0 12px 18px rgba(89,53,16,.18);
}
.ytk-tab.is-active .ytk-tab-icon { background: var(--tab); }
.ytk-tab.is-active .ytk-tab-label b { text-shadow: none; }


/* subcategory chips */
.ytk-subrow { background: var(--lm-white); border-top: 3px solid rgba(89,53,16,.07); }
.ytk-subrow[hidden] { display: none; }
.ytk-subrow-inner {
  display: flex; gap: 8px; overflow-x: auto; max-width: 1400px; margin: 0 auto; padding: 10px 20px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.ytk-subrow-inner::-webkit-scrollbar { display: none; }
.ytk-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: var(--ytk-tap); padding: 4px 16px 4px 10px;
  border-radius: 999px; border: 3px solid rgba(89,53,16,.18); background: var(--lm-cream); color: var(--lm-ink) !important;
  text-decoration: none !important; font: 800 .98rem var(--font-display); transition: transform .12s ease, background .12s ease;
}
.ytk-chip:hover { transform: translateY(-1px); background: var(--lm-sun); }
.ytk-chip-icon { display: grid; place-items: center; width: 30px; height: 30px; color: var(--lm-marigold-deep); }
.ytk-chip-icon svg { width: 100%; height: 100%; }
.ytk-chip-label { display: flex; flex-direction: column; line-height: 1.05; }
.ytk-chip-label i, .ytk-chip i { font: 700 .7rem var(--font-body); font-style: normal; opacity: .75; }
.ytk-chip.is-current { background: var(--lm-corn); border-color: var(--lm-marigold-deep); }
.ytk-chip.is-soon { border-style: dashed; }
.ytk-chip--back { background: transparent; border-color: transparent; padding-left: 4px; opacity: .85; }
.ytk-chip--static { cursor: default; background: var(--lm-sky); border-color: transparent; }
.ytk-chip--static:hover { transform: none; background: var(--lm-sky); }

/* search panel */
.ytk-search { position: fixed; left: 0; right: 0; top: var(--lm-header-h); bottom: 0; z-index: 990; background: var(--lm-cream); overflow-y: auto; }
body.admin-bar .ytk-search { top: calc(var(--lm-header-h) + 32px); }
.ytk-search[hidden] { display: none; }
.ytk-search-inner { max-width: 1000px; margin: 0 auto; padding: 18px 20px 60px; }
.ytk-search-form { display: flex; gap: 10px; align-items: center; margin: 0 0 18px; }
.ytk-search-form input {
  flex: 1; min-height: 56px; border-radius: 999px; border: 4px solid var(--lm-marigold); padding: 0 22px;
  font: 700 1.2rem var(--font-body); background: #fff; color: var(--lm-ink);
}
.ytk-search-form input:focus { outline: 4px solid var(--lm-turquoise); outline-offset: 2px; }
.ytk-search-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
body.ytk-searching { overflow: hidden; }

/* ---- layout shell ------------------------------------------------------- */
body.lm-site { background: var(--lm-cream); }
.ytk-main { max-width: 1400px; margin: 0 auto; padding: 18px 20px 40px; }
.ytk-main h1, .ytk-main h2, .ytk-main h3 { font-family: var(--font-display); color: var(--lm-ink); margin: 0; line-height: 1.05; }
.ytk-main i { font-style: normal; }

/* welcome (compact) */
.ytk-welcome {
  display: flex; align-items: center; gap: 18px; margin: 4px 0 22px; padding: 12px 22px 12px 18px;
  background: linear-gradient(100deg, #FFE17A, #FFC95C); border-radius: var(--ytk-r); box-shadow: var(--lm-shadow);
}
.ytk-welcome-art { display: flex; align-items: flex-end; flex: none; height: 92px; }
.ytk-welcome-art img { height: 110px; width: auto; margin-top: -22px; margin-right: -14px; filter: drop-shadow(0 6px 0 rgba(89,53,16,.15)); }
.ytk-welcome h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.ytk-welcome h1 span { display: block; font: 700 1rem var(--font-body); color: var(--lm-ink-soft); margin-top: 2px; }
.ytk-welcome p { margin: 4px 0 0; font-weight: 700; }

/* shelves */
.ytk-shelf { margin: 0 0 30px; }
.ytk-shelf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.ytk-shelf-head h2, .ytk-results-head h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.45rem, 2.6vw, 2rem); }
.ytk-shelf-head h2 span, .ytk-results-head h2 span { display: flex; flex-direction: column; }
.ytk-shelf-head h2 i, .ytk-results-head h2 i, .ytk-main h1 span, .ytk-up-next h2 i { font: 700 .95rem var(--font-body); color: var(--lm-ink-soft); }
.ytk-shelf-icon, .ytk-results-icon {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; flex: none;
  background: var(--lm-marigold); box-shadow: 0 4px 0 var(--lm-marigold-deep);
}
.ytk-shelf-icon svg, .ytk-results-icon svg { width: 34px; height: 34px; }
.ytk-shelf--xmas .ytk-shelf-icon { background: #2F9E5B; box-shadow: 0 4px 0 #1E7440; }
.ytk-shelf--organize .ytk-shelf-icon { background: var(--lm-nopal); box-shadow: 0 4px 0 var(--lm-nopal-deep); }
.ytk-shelf--puzzle .ytk-shelf-icon { background: var(--lm-turquoise); box-shadow: 0 4px 0 var(--lm-turquoise-deep); }
.ytk-shelf--adventure .ytk-shelf-icon { background: #EF7DA0; box-shadow: 0 4px 0 #C4577C; }
.ytk-see-all {
  display: inline-flex; align-items: center; min-height: var(--ytk-tap); padding: 0 18px; border-radius: 999px;
  background: var(--lm-white); border: 3px solid rgba(89,53,16,.18); font: 800 1rem var(--font-display);
  color: var(--lm-chile-deep) !important; text-decoration: none !important; white-space: nowrap;
}
.ytk-see-all:hover { background: var(--lm-sun); }
.ytk-shelf--xmas {
  padding: 16px 0 6px 16px; margin-left: -4px; border-radius: 30px;
  background: linear-gradient(135deg, #D8F0DD, #FFF1C9 70%); box-shadow: inset 0 0 0 3px rgba(47,158,91,.25);
}
.ytk-shelf--xmas .ytk-shelf-head { padding-right: 16px; }
.ytk-rail {
  display: flex; gap: 16px; overflow-x: auto; padding: 4px 16px 18px 2px; margin-right: -20px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--lm-marigold) transparent;
}
.ytk-rail > * { scroll-snap-align: start; flex: 0 0 auto; }
.ytk-rail .ytk-card { width: min(340px, 78vw); }
.ytk-rail--tiles { margin-right: 0; flex-wrap: wrap; overflow: visible; }

/* grid (category pages / filtered view) */
.ytk-grid { display: grid; gap: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ytk-grid [hidden] { display: none !important; }
.ytk-results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.ytk-results[hidden], .ytk-view[hidden], .ytk-lower[hidden] { display: none; }

/* ---- video card --------------------------------------------------------- */
.ytk-card-link { display: block; text-decoration: none !important; color: var(--lm-ink) !important; }
.ytk-thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--ytk-r);
  background: #3b2412; box-shadow: 0 6px 0 var(--card, var(--lm-marigold-deep)), 0 14px 22px rgba(89,53,16,.18);
  transition: transform .15s ease, box-shadow .15s ease; isolation: isolate;
}
.ytk-card-link:hover .ytk-thumb, .ytk-up:hover .ytk-thumb { transform: translateY(-3px); }
.ytk-card-link:focus-visible .ytk-thumb { outline: 4px solid var(--lm-turquoise-deep); outline-offset: 4px; }
.ytk-thumb-bg { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(26px) saturate(1.25) brightness(.7); z-index: -1; }
.ytk-thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ytk-thumb-ph { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: var(--lm-marigold); }
.ytk-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #1a0f06; z-index: 2; }
.ytk-play {
  position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,253,248,.92); color: var(--lm-chile); z-index: 3; box-shadow: 0 3px 0 rgba(0,0,0,.2);
}
.ytk-play svg { margin-left: 3px; width: 22px; height: 22px; }
.ytk-dur {
  position: absolute; right: 10px; bottom: 10px; z-index: 3; background: rgba(34,18,6,.85); color: #fff; border-radius: 10px;
  padding: 3px 9px; font: 800 .9rem var(--font-display); letter-spacing: .02em;
}
.ytk-card-meta { display: block; padding: 12px 6px 0; }
.ytk-card-title { display: block; font: 800 1.3rem/1.15 var(--font-display); color: var(--lm-ink); }
.ytk-card-sub { display: block; margin-top: 3px; font: 700 .98rem var(--font-body); color: var(--lm-ink-soft); }
.ytk-card--decorating { --card: var(--lm-marigold-deep); }
.ytk-card--organize   { --card: var(--lm-nopal-deep); }
.ytk-card--puzzle     { --card: var(--lm-turquoise-deep); }
.ytk-card--adventure  { --card: #C4577C; }
.ytk-card--decorating .ytk-thumb { --card: #1E7440; }

/* soon tiles + subtiles */
.ytk-soon-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  width: min(300px, 78vw); min-height: 190px; padding: 18px; border-radius: var(--ytk-r); text-decoration: none !important;
  background: var(--lm-white); border: 4px dashed var(--tile, var(--lm-marigold)); color: var(--lm-ink) !important;
  transition: transform .15s ease, background .15s ease;
}
.ytk-soon-tile:hover { transform: translateY(-3px); background: var(--lm-sun); }
.ytk-soon-icon { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: var(--tile, var(--lm-marigold)); color: #fff; margin-bottom: 4px; }
.ytk-soon-icon svg { width: 46px; height: 46px; }
.ytk-soon-tile b { font: 800 1.35rem var(--font-display); }
.ytk-soon-tile i { font: 700 .9rem var(--font-body); color: var(--lm-ink-soft); }
.ytk-soon-note { margin-top: 6px; font: 800 .85rem var(--font-display); color: var(--lm-chile-deep); background: #FFE9A8; padding: 3px 12px; border-radius: 999px; }
.ytk-soon-tile--decorating { --tile: var(--lm-marigold); }
.ytk-soon-tile--organize { --tile: var(--lm-nopal); }
.ytk-soon-tile--puzzle { --tile: var(--lm-turquoise); }
.ytk-soon-tile--adventure { --tile: #EF7DA0; }

/* empty state */
.ytk-empty { text-align: center; max-width: 560px; margin: 24px auto 40px; padding: 30px 22px; background: var(--lm-white); border-radius: 32px; box-shadow: var(--lm-shadow); }
.ytk-empty-icon { display: inline-grid; place-items: center; width: 120px; height: 120px; border-radius: 50%; background: var(--lm-corn); color: var(--lm-chile); margin-bottom: 10px; animation: ytk-bob 2.6s ease-in-out infinite; }
.ytk-empty-icon svg { width: 76px; height: 76px; }
.ytk-empty h3 { font-size: 1.7rem; }
.ytk-empty h3 i { display: block; font: 700 1rem var(--font-body); color: var(--lm-ink-soft); margin-top: 4px; }
.ytk-empty p { margin: 12px 0 18px; font-weight: 700; }
.ytk-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--ytk-tap); padding: 0 24px; border-radius: 999px;
  background: var(--lm-chile); color: #fff !important; font: 800 1.05rem var(--font-display); text-decoration: none !important; box-shadow: 0 5px 0 var(--lm-chile-deep);
}
.ytk-btn:hover { background: var(--lm-marigold); }
@keyframes ytk-bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }

/* ---- category page header ---------------------------------------------- */
.ytk-cat-head { display: flex; align-items: center; gap: 18px; margin: 4px 0 22px; padding: 16px 22px; border-radius: var(--ytk-r); background: linear-gradient(100deg, var(--head, #FFE17A), #FFF1C9); box-shadow: var(--lm-shadow); }
.ytk-cat-head-icon { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; flex: none; color: #fff; background: var(--lm-marigold); box-shadow: 0 5px 0 var(--lm-marigold-deep); }
.ytk-cat-head-icon svg { width: 62px; height: 62px; }
.ytk-cat-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.ytk-cat-head h1 span { display: block; }
.ytk-cat-head p { margin: 6px 0 0; font-weight: 700; }
.ytk-cat-head p em { font-style: normal; color: var(--lm-ink-soft); }
.ytk-cat--organize .ytk-cat-head { --head: #D9EEBE; } .ytk-cat--organize .ytk-cat-head-icon { background: var(--lm-nopal); box-shadow: 0 5px 0 var(--lm-nopal-deep); }
.ytk-cat--puzzle .ytk-cat-head { --head: #BFEAF0; } .ytk-cat--puzzle .ytk-cat-head-icon { background: var(--lm-turquoise); box-shadow: 0 5px 0 var(--lm-turquoise-deep); }
.ytk-cat--adventure .ytk-cat-head { --head: #FBD0DE; } .ytk-cat--adventure .ytk-cat-head-icon { background: #EF7DA0; box-shadow: 0 5px 0 #C4577C; }
.ytk-main .lm-crumbs { margin: 0 0 6px; font: 800 .9rem var(--font-display); }
.ytk-main .lm-crumbs a { color: var(--lm-chile-deep); }
.ytk-subtiles .ytk-soon-tile { min-height: 170px; width: min(260px, 78vw); }
.ytk-main .page-numbers { display: inline-grid; place-items: center; min-width: var(--ytk-tap); min-height: var(--ytk-tap); border-radius: 50%; background: #fff; margin: 4px; font-weight: 800; text-decoration: none; }
.ytk-main .page-numbers.current { background: var(--lm-corn); }
.ytk-main .nav-links { text-align: center; margin-top: 26px; }

/* ---- watch page --------------------------------------------------------- */
.ytk-watch-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.ytk-stage {
  position: relative; display: grid; place-items: center; border-radius: 28px; overflow: hidden; background: #2a170a var(--ytk-bg) center/cover no-repeat;
  padding: 14px 0; box-shadow: 0 8px 0 var(--lm-marigold-deep), 0 18px 30px rgba(89,53,16,.22); isolation: isolate;
}
.ytk-stage::before { content: ""; position: absolute; inset: 0; background: rgba(26,12,4,.55); backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); z-index: -1; }
.ytk-player { display: block; background: #000; border-radius: 18px; max-width: 100%; }
.ytk-player.is-vertical { height: min(74vh, 700px); aspect-ratio: 9 / 16; width: auto; }
.ytk-player.is-wide { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 0; }
.ytk-stage.is-wide { padding: 0; }
.ytk-nomp4 { display: grid; place-items: center; gap: 4px; padding: 80px 20px; color: #fff; text-align: center; }
.ytk-nomp4 b { font: 800 1.6rem var(--font-display); }
.ytk-format-switch { display: flex; gap: 8px; margin: 12px 0 0; }
.ytk-pill { min-height: var(--ytk-tap); padding: 0 20px; border-radius: 999px; border: 3px solid rgba(89,53,16,.2); background: #fff; font: 800 1rem var(--font-display); color: var(--lm-ink); cursor: pointer; }
.ytk-pill.is-on { background: var(--lm-corn); border-color: var(--lm-marigold-deep); }
.ytk-watch-info { padding: 18px 4px 0; }
.ytk-watch-info h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.ytk-watch-info h1 span { display: block; font: 700 1.2rem var(--font-body); color: var(--lm-ink-soft); margin-top: 6px; }
.ytk-watch-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.ytk-desc { background: var(--lm-white); border-radius: 22px; padding: 16px 20px; box-shadow: var(--lm-shadow); }
.ytk-desc p { margin: 0 0 10px; font-size: 1.12rem; font-weight: 700; }
.ytk-desc p:last-child { margin: 0; color: var(--lm-ink-soft); }
.ytk-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.ytk-pn {
  display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 10px 16px; border-radius: 22px; background: var(--lm-turquoise); color: #fff !important;
  text-decoration: none !important; box-shadow: 0 5px 0 var(--lm-turquoise-deep); transition: transform .12s ease;
}
.ytk-pn:hover { transform: translateY(-2px); }
.ytk-pn--next { justify-content: flex-end; text-align: right; background: var(--lm-chile); box-shadow: 0 5px 0 var(--lm-chile-deep); }
.ytk-pn-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: rgba(255,255,255,.28); }
.ytk-pn-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.ytk-pn-text small { font: 700 .78rem var(--font-body); opacity: .95; }
.ytk-pn-text b { font: 800 1.12rem var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ytk-outlinks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 6px 0 0; }
.ytk-yt-link { display: inline-flex; align-items: center; min-height: var(--ytk-tap); font: 800 .95rem var(--font-display); color: var(--lm-ink-soft) !important; }
.ytk-upnext h2 { font-size: 1.7rem; margin: 0 0 14px; }
.ytk-upnext h2 i { display: block; }
.ytk-upnext ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ytk-up { display: flex; gap: 12px; text-decoration: none !important; color: var(--lm-ink) !important; align-items: flex-start; min-height: var(--ytk-tap); }
.ytk-thumb--sm { width: 168px; flex: none; border-radius: 16px; box-shadow: 0 4px 0 var(--lm-marigold-deep); }
.ytk-thumb--sm .ytk-dur { font-size: .75rem; padding: 1px 6px; right: 6px; bottom: 6px; border-radius: 8px; }
.ytk-up .ytk-card-meta { padding: 2px 0 0; }
.ytk-up .ytk-card-title { font-size: 1.12rem; }
.ytk-up .ytk-card-sub { font-size: .88rem; }
.ytk-up:hover .ytk-card-title { color: var(--lm-chile-deep); }

/* ---- lower (characters + shop, below the videos) ------------------------ */
.ytk-lower { margin-top: 36px; }
.ytk-lower .lm-characters, .ytk-lower .lm-shop { border-radius: 36px; overflow: hidden; margin-bottom: 26px; }
.ytk-lower .lm-section-title { font-size: 2rem; }

/* footer: channel link */
.lm-footer-yt { background: var(--lm-white) !important; color: var(--lm-chile-deep) !important; }

/* ---- responsive --------------------------------------------------------- */
@media (min-width: 1000px) {
  .ytk-watch-grid { grid-template-columns: minmax(0, 1fr) 390px; gap: 34px; }
  .ytk-upnext { position: sticky; top: calc(var(--lm-header-h) + 14px); max-height: calc(100vh - var(--lm-header-h) - 28px); overflow-y: auto; padding-right: 6px; }
}
@media (max-width: 760px) {
  .ytk-bar { padding: 2px 10px 4px; }
  .ytk-bar .lm-logo img { height: 46px; max-width: 96px; }
  .ytk-iconbtn { padding: 0 12px; }
  .ytk-iconbtn-text i { display: none; }
  .ytk-search-toggle .ytk-iconbtn-text, .ytk-channel .ytk-iconbtn-text { display: none; }
  .ytk-search-toggle, .ytk-channel { padding: 0; width: var(--ytk-tap); }
  .lm-chrome .lm-papel { height: 12px; background-size: auto 12px; }
  .ytk-tabs ul { padding: 6px 10px 12px; gap: 8px; }
  .ytk-tab { flex-direction: column; justify-content: center; gap: 2px; min-width: 84px; min-height: 80px; padding: 8px 8px 8px; border-radius: 20px; text-align: center; }
  .ytk-tab-icon { width: 42px; height: 42px; }
  .ytk-tab-icon svg { width: 28px; height: 28px; }
  .ytk-tab-label { align-items: center; text-align: center; }
  .ytk-tab-label b { font-size: 1rem; }
  .ytk-tab-label i { font-size: .68rem; }
  .ytk-subrow-inner { padding: 8px 10px; }
  .ytk-main { padding: 12px 14px 30px; }
  .ytk-welcome { padding: 10px 14px; gap: 10px; }
  .ytk-welcome-art { height: 74px; } .ytk-welcome-art img { height: 88px; margin-top: -16px; }
  .ytk-welcome p { display: none; }
  .ytk-cat-head { padding: 14px; gap: 12px; }
  .ytk-cat-head-icon { width: 68px; height: 68px; } .ytk-cat-head-icon svg { width: 44px; height: 44px; }
  .ytk-grid { grid-template-columns: 1fr; }
  .ytk-rail { margin-right: -14px; }
  .ytk-shelf--xmas { margin-left: -6px; padding-left: 12px; }
  .ytk-see-all { padding: 0 14px; font-size: .9rem; }
  .ytk-prevnext { grid-template-columns: 1fr; }
  .ytk-search-list { grid-template-columns: 1fr; }
  .ytk-stage { border-radius: 22px; }
}
@media (min-width: 761px) and (max-width: 999px) {
  .ytk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ytk-bar .lm-logo img { height: 54px; }
}
@media (min-width: 1000px) {
  .ytk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1360px) {
  .ytk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .ytk-tab, .ytk-chip, .ytk-iconbtn, .ytk-thumb, .ytk-soon-tile, .ytk-pn { transition: none !important; }
  .ytk-empty-icon { animation: none !important; }
  html { scroll-behavior: auto !important; }
}

.ytk-main .lm-crumbs { justify-content: flex-start; text-align: left; }
.ytk-cat--christmas .ytk-cat-head { --head: #CFEBD6; }
.ytk-cat--christmas .ytk-cat-head-icon { background: #2F9E5B; box-shadow: 0 5px 0 #1E7440; }
.ytk-see-all .ytk-en { opacity: .8; }
.ytk-subtiles .ytk-rail--tiles { flex-wrap: nowrap; overflow-x: auto; }
.lm-footer-nav .lm-footer-yt { color: var(--lm-chile-deep) !important; font-weight: 800; }

/* compact chrome on phones when scrolling down: only the category tabs stay */
@media (max-width: 760px) {
  .ytk-bar, .lm-chrome .lm-papel { transition: max-height .2s ease, opacity .2s ease, padding .2s ease; max-height: 80px; overflow: hidden; }
  body.ytk-compact .ytk-bar, body.ytk-compact .lm-chrome .lm-papel { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; }
  .ytk-see-all .ytk-en { display: none; }
  .ytk-shelf-head h2, .ytk-results-head h2 { font-size: 1.3rem; gap: 10px; }
  .ytk-shelf-icon, .ytk-results-icon { width: 44px; height: 44px; } .ytk-shelf-icon svg, .ytk-results-icon svg { width: 28px; height: 28px; }
  .ytk-tab { min-height: 72px; min-width: 80px; }
  .ytk-tab-icon { width: 36px; height: 36px; } .ytk-tab-icon svg { width: 24px; height: 24px; }
  .ytk-tabs ul { padding: 6px 10px 10px; }
  .ytk-subrow-inner { padding: 6px 10px; }
  .ytk-chip { min-height: 48px; }
  .ytk-player.is-vertical { height: min(54vh, 520px); }
  .ytk-stage { padding: 10px 0; }
}
@media (min-width: 761px) {
  .ytk-player.is-vertical { height: min(60vh, 560px); }
}
@media (prefers-reduced-motion: reduce) { .ytk-bar, .lm-chrome .lm-papel { transition: none !important; } }

/* overflow-x:hidden on html/body/#page turns them into scroll containers and breaks position:sticky. clip does not. */
html, body.lm-site, .lm-site #page { overflow-x: clip !important; overflow-y: visible !important; }

.ytk-welcome[hidden] { display: none; }
.ytk-iconbtn, .ytk-iconbtn:focus, .ytk-iconbtn:hover, .ytk-iconbtn:active { color: var(--lm-ink) !important; background-color: var(--lm-white); }
.ytk-search-toggle, .ytk-search-toggle:focus, .ytk-search-toggle:hover { background-color: var(--lm-sun); }
.ytk-shop, .ytk-shop:hover, .ytk-shop:focus { background-color: var(--lm-chile); color: #fff !important; }
.ytk-search-close, .ytk-search-close:hover, .ytk-search-close:focus { background-color: var(--lm-white); padding: 0; width: 56px; height: 56px; }
.ytk-pill, .ytk-pill:hover, .ytk-pill:focus { color: var(--lm-ink); }

/* ======================= YouTube-style home feed ======================= */
.ytk-filters { margin: 0 0 18px; }
.ytk-filters ul {
  list-style: none; margin: 0; padding: 0 2px 8px; display: flex; gap: 10px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.ytk-filters ul::-webkit-scrollbar { display: none; }
.ytk-filters .ytk-chip { background: #fff; border-color: rgba(89,53,16,.16); }
.ytk-filters .ytk-chip.is-current { background: var(--lm-ink); color: #fff !important; border-color: var(--lm-ink); }
.ytk-filters .ytk-chip.is-current .ytk-chip-icon { color: #FEE66F; }
.ytk-filters .ytk-chip.is-current .ytk-chip-label i { color: #fff; opacity: .85; }
.ytk-filters .ytk-chip--new.is-current { background: #E23D28; border-color: #E23D28; }
.ytk-filters .ytk-chip--new:not(.is-current) .ytk-chip-icon { color: #E23D28; }

.ytk-new {
  position: absolute; left: 10px; top: 10px; z-index: 3;
  background: #E23D28; color: #fff; font: 800 .78rem/1 var(--font-display);
  padding: 5px 9px; border-radius: 9px; box-shadow: 0 2px 0 rgba(89,53,16,.3);
  letter-spacing: .02em;
}
.ytk-new i { font: 700 .72em var(--font-body); font-style: normal; margin-left: 4px; opacity: .95; }
.ytk-new--inline { position: static; display: inline-flex; align-items: center; box-shadow: none; margin: 0 6px 0 0; }

.ytk-card-meta { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px 0; }
.ytk-avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  background: #FFF1B8; border: 2px solid #593510; box-shadow: 0 2px 0 rgba(89,53,16,.2);
}
.ytk-card-copy { min-width: 0; flex: 1; }
.ytk-card-by { display: block; margin-top: 5px; font: 700 .86rem var(--font-body); color: var(--lm-ink-soft); }
.ytk-card-cat i { font-style: normal; opacity: .8; }

.ytk-thumb-img, .ytk-preview { object-fit: cover; }
.ytk-hero { margin: 0 0 28px; }
.ytk-hero .ytk-card--hero { display: block; }
.ytk-hero .ytk-card-link { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, .9fr); gap: 22px; align-items: center; }
.ytk-hero .ytk-thumb { aspect-ratio: 16 / 9; border-radius: 22px; }
.ytk-hero .ytk-card-title { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.ytk-hero .ytk-card-meta { padding-top: 0; }
.ytk-hero .ytk-avatar { width: 52px; height: 52px; }
.ytk-shelf--new { margin-bottom: 10px; }

/* 4 columns at 1280, 2 at 768, 1 at 390 */
.ytk-grid { grid-template-columns: 1fr; }
@media (min-width: 761px) {
  .ytk-grid, .ytk-results .ytk-grid, .ytk-results--home .ytk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .ytk-grid, .ytk-results .ytk-grid, .ytk-results--home .ytk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .ytk-grid, .ytk-results .ytk-grid, .ytk-results--home .ytk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ytk-hero .ytk-card--hero { padding: 0; }
}
@media (max-width: 760px) {
  .ytk-hero .ytk-card-link { grid-template-columns: 1fr; gap: 12px; }
  .ytk-filters { margin: 0 -4px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ytk-preview { display: none; }
}
