/* Android home dimensions expressed in CSS pixels; only the iOS homepage owns these rules. */
html.ios-home-active,html.ios-home-active body{height:100%;overflow:hidden!important;overscroll-behavior:none;background:#202124}
html.ios-home-active .site-nav{display:none!important}
html.ios-home-active .channel-nav{position:fixed;z-index:1300;top:calc(var(--ih-viewport-top,0px) + var(--mobile-safe-top,0px));left:0;right:0;height:54px;background:transparent;border:0;box-shadow:none}
html.ios-home-active .channel-nav-inner{background:transparent}
html.ios-home-active .channel-tab{font-size:16px;font-weight:700;color:#ddd;text-shadow:0 1px 4px #0005}
html.ios-home-active .channel-tab.selected{color:#ffd233}
html.ios-home-active .mobile-search-entry{background:transparent}
html.ios-home-active main,html.ios-home-active .site-footer{visibility:hidden;pointer-events:none}
html.ios-home-active .mobile-bottom-nav{background:#202124;border:0;z-index:1350}
html.ios-home-active .mobile-bottom-nav [data-mobile-tab=home]{color:#ffd233}
.ih-feed{position:fixed;z-index:1200;top:var(--ih-top,0px);left:0;right:0;height:var(--ih-height,calc(100dvh - 76px));overflow-x:hidden;overflow-y:auto;scroll-snap-type:y mandatory;overscroll-behavior:none;scrollbar-width:none;touch-action:pan-y;-webkit-overflow-scrolling:touch;color:#fff;background:#202124;font-family:system-ui,-apple-system,"PingFang SC",sans-serif}
.ih-feed::-webkit-scrollbar{display:none}
.ih-feed[hidden],.ih-status[hidden],.ih-comments[hidden],.ih-feed [hidden],.ih-comments [hidden]{display:none!important}
.ih-slide{position:relative;isolation:isolate;width:100%;height:100%;overflow:hidden;scroll-snap-align:start;scroll-snap-stop:always;background:linear-gradient(180deg,color-mix(in srgb,var(--ih-background) 94%,white),var(--ih-background) 62%,#08090b)}
.ih-slide::after{content:"";position:absolute;inset:auto 0 0;height:190px;pointer-events:none;background:linear-gradient(transparent,#000b);z-index:1}
.ih-media{position:absolute;inset:0;overflow:hidden;transition:height .25s,top .25s,transform .25s}
.ih-video,.ih-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:transparent}
.ih-poster{object-fit:contain}.ih-video{z-index:1}.ih-slide.has-frame .ih-poster{visibility:hidden}
.ih-slide.is-landscape .ih-media{left:4px;right:4px;top:var(--ih-media-center,45%);bottom:auto;aspect-ratio:var(--ih-video-ratio,16/9);transform:translateY(-50%)}
.ih-slide.is-landscape .ih-video,.ih-slide.is-landscape .ih-poster{object-fit:contain}
.ih-play{position:absolute;z-index:5;top:44%;left:50%;transform:translate(-50%,-50%);width:60px;height:60px;padding:8px;background:none;border:0;opacity:0;pointer-events:none}
.ih-play img{width:44px;height:44px;filter:brightness(0) invert(1);opacity:.8}.ih-slide.is-paused .ih-play{opacity:1;pointer-events:auto}
.ih-rail{position:absolute;z-index:6;right:12px;display:flex;flex-direction:column;gap:22px;align-items:center}
.ih-reaction{position:relative;display:flex;flex-direction:column;align-items:center;min-width:48px;min-height:64px;padding:0;border:0;background:none;color:#d0cfd6;-webkit-tap-highlight-color:transparent}
.ih-reaction>img{display:block;box-sizing:content-box;width:35px;height:35px;padding:6.5px;filter:drop-shadow(0 1px 2px #0003)}
.ih-count{font-size:15px;line-height:18px;font-weight:400;white-space:nowrap;text-shadow:0 1px 3px #0004}
.ih-reaction[aria-pressed=true]{color:#ffd233}.ih-reaction[aria-pressed=true]>img,.ih-heart-burst{filter:brightness(0) saturate(100%) invert(85%) sepia(75%) saturate(700%) hue-rotate(344deg) brightness(105%)!important}
.ih-reaction.is-bouncing>img{animation:ih-bounce .3s ease-out}.ih-reaction .ih-heart-burst{position:absolute;left:8px;top:0;padding:0;width:30px;height:30px;pointer-events:none;animation:ih-heart .7s ease-out forwards}
@keyframes ih-bounce{50%{transform:scale(1.23)}}@keyframes ih-heart{to{transform:translate(-12px,-85px) rotate(-15deg) scale(1.35);opacity:0}}
.ih-meta{position:absolute;z-index:4;left:16px;right:84px;bottom:55px}
.ih-rank{display:inline-flex;max-width:100%;box-sizing:border-box;gap:4px;align-items:center;padding:5px 6px;border-radius:4px;margin-bottom:8px;font-size:12px;font-weight:700;line-height:16px}
.ih-rank>img{width:14px;height:14px}.ih-rank span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ih-heading{display:flex;align-items:center;gap:8px;min-width:0}.ih-badge{flex:none;border-radius:4px;padding:3px 5px;font-size:12px;font-weight:700;line-height:18px;color:#fff}
.ih-title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:21px;line-height:28px;font-weight:700;text-shadow:0 1px 3px #0009;letter-spacing:0}
.ih-tags{display:flex;gap:6px;margin-top:8px;overflow:hidden;max-width:100%}.ih-tag{flex:none;padding:3px 8px;border-radius:4px;background:#333;color:#fff;font-size:12px;line-height:18px;white-space:nowrap}
.ih-full{position:absolute;z-index:5;left:16px;right:16px;bottom:3px;height:42px;padding:0 4px;display:flex;align-items:center;gap:9px;border:0;background:none;color:#fff;text-align:left;font-size:14px}
.ih-full>img:first-child{width:19px;height:19px;filter:brightness(0) invert(1)}.ih-full strong{font-size:14px;font-weight:700;white-space:nowrap}.ih-full-count{font-size:13px;font-weight:600;color:#aaa;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ih-chevron{width:14px;height:14px;transform:rotate(-90deg);filter:brightness(0) invert(1)}.ih-full>.ih-chevron{margin-left:auto;flex:none}
.ih-danmaku-toggle{position:absolute;z-index:6;bottom:102px;right:18px;width:34px;height:34px;border:0;border-radius:17px;background:#0006;color:#fff;font-size:15px;display:grid;place-items:center}.ih-danmaku-toggle[aria-pressed=true]{background:#fffc;color:#111}
.ih-seek{position:absolute;z-index:8;bottom:-7px;left:5px;width:calc(100% - 10px);height:20px;margin:0;padding:0;appearance:none;-webkit-appearance:none;background:transparent;touch-action:none;--ih-progress:0%}
.ih-seek::-webkit-slider-runnable-track{height:2px;background:linear-gradient(to right,#eee var(--ih-progress),#ffffff40 var(--ih-progress));border-radius:1px}.ih-seek::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:4px;height:4px;border-radius:2px;background:#eee;margin-top:-1px}
.ih-seek:active::-webkit-slider-thumb{width:10px;height:10px;margin-top:-4px}.ih-seek:active::-webkit-slider-runnable-track{height:3px}
.ih-sound{position:absolute;z-index:7;left:50%;top:calc(var(--mobile-safe-top,0px) + 64px);transform:translateX(-50%);padding:6px 10px;border:0;border-radius:14px;background:#0007;color:#fff;font-size:11px;white-space:nowrap}
.ih-status{position:fixed;z-index:1310;top:42%;left:50%;transform:translate(-50%,-50%);max-width:270px;padding:12px 18px;border-radius:8px;background:#111c;color:#fff;text-align:center;font-size:14px}
.ih-retry{display:block;margin:10px auto 0;padding:8px 16px;border:0;border-radius:5px;background:#ffd233;color:#151515;font-size:14px}
.ih-danmaku{position:absolute;z-index:3;left:0;right:0;top:var(--ih-danmaku-top,64px);height:var(--ih-danmaku-height,130px);overflow:hidden;pointer-events:none}
.ih-bullet{position:absolute;left:0;white-space:nowrap;font-size:15px;font-weight:500;line-height:26px;color:#fff;text-shadow:0 1px 2px #000b;will-change:transform}
.ih-bullet-heart{width:13px;height:13px;vertical-align:-1px;margin:0 4px}
.ih-comments{position:fixed;z-index:2400;left:0;right:0;top:calc(var(--ih-viewport-top,0px) + var(--ih-viewport,100dvh)*.44);height:calc(var(--ih-viewport,100dvh)*.56);display:flex;flex-direction:column;box-sizing:border-box;border-radius:20px 20px 0 0;background:#fff;color:#161616;padding-bottom:env(safe-area-inset-bottom,0px);overflow:hidden;font-family:system-ui,-apple-system,"PingFang SC",sans-serif;color-scheme:light;box-shadow:0 -2px 15px #0002}
.ih-comments-head{position:relative;flex:none;height:54px;display:flex;justify-content:center;align-items:center}.ih-comments-head h2{font-size:16px;font-weight:700;margin:0;line-height:24px}.ih-comments-close{position:absolute;left:8px;top:3px;width:48px;height:48px;padding:13px;border:0;background:none}.ih-comments-close img{width:22px;height:22px;filter:brightness(0)}
.ih-comments-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;padding:0 16px 10px;outline:none}
.ih-comment,.ih-reply{display:flex;gap:10px;padding:12px 0}.ih-avatar{position:relative;flex:0 0 36px;width:36px;height:36px;overflow:hidden;border-radius:50%;background:#eee;color:#888;display:grid;place-items:center;font-size:14px}.ih-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ih-comment-main{min-width:0;flex:1}.ih-comment-name{color:#929292;font-size:12px;line-height:18px;margin-bottom:4px}.ih-comment-text{font-size:15px;line-height:22px;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;color:#171717}.ih-comment-time{margin-top:6px;color:#a0a0a0;font-size:11px;line-height:17px}
.ih-reply-toggle{padding:6px 0 0;border:0;background:none;color:#f5a623;text-align:left;font-size:12px;line-height:20px}.ih-reply{padding:10px 0 2px;gap:8px}.ih-reply .ih-avatar{flex-basis:24px;width:24px;height:24px;font-size:10px}.ih-reply .ih-comment-text{font-size:14px;line-height:21px}
.ih-comment-tail{padding:14px 0 20px;text-align:center;min-height:24px}.ih-comment-state{display:flex;align-items:center;justify-content:center;gap:8px;color:#969696;font-size:12px;line-height:24px}.ih-comment-more,.ih-comment-retry{border:0;background:none;color:#999;font-size:12px;padding:8px 14px;min-height:38px}.ih-comment-retry{color:#de9421}
.ih-spinner{display:inline-block;box-sizing:border-box;width:16px;height:16px;border:2px solid #f7dcb1;border-top-color:#f5a623;border-radius:50%;animation:ih-spin .8s linear infinite}@keyframes ih-spin{to{transform:rotate(360deg)}}
.ih-emoji{display:inline-block;width:1.25em;height:1.25em;vertical-align:-.22em;background-repeat:no-repeat}
.ih-comments{padding-top:12px}.ih-comments::before{content:"";position:absolute;top:8px;left:calc(50% - 18px);width:36px;height:4px;background:#d8d8dc;border-radius:1px}.ih-comments-head{height:52px}.ih-comments-head h2{font-size:17px}.ih-comment{padding-top:14px}.ih-avatar{flex-basis:40px;width:40px;height:40px;font-size:17px}.ih-comment-name{color:#8e8e93;font-size:13px;margin-bottom:3px}.ih-comment-time{color:#a0a0a5}.ih-reply{padding-top:8px;gap:9px}.ih-reply .ih-avatar{flex-basis:30px;width:30px;height:30px;font-size:13px}.ih-reply .ih-comment-text{color:#404046}.ih-reply .ih-comment-time{margin-top:4px}.ih-reply-level{display:inline-block;margin-left:6px;padding:0 4px;background:#e8f1fd;color:#4c8df6;font-size:10px}
.ih-feed.comments-open{overflow:hidden;touch-action:none}.ih-feed.comments-open .ih-slide.is-current .ih-media{top:calc(var(--mobile-safe-top,0px) + 54px);height:calc(var(--ih-viewport,100dvh)*.44 - var(--mobile-safe-top,0px) - 58px);bottom:auto;left:0;right:0;aspect-ratio:auto;transform:none}.ih-feed.comments-open .ih-video{object-fit:contain}.ih-feed.comments-open .ih-meta,.ih-feed.comments-open .ih-rail,.ih-feed.comments-open .ih-full,.ih-feed.comments-open .ih-seek,.ih-feed.comments-open .ih-danmaku-toggle,.ih-feed.comments-open .ih-danmaku,.ih-feed.comments-open .ih-sound{visibility:hidden}.ios-home-comments-open .mobile-bottom-nav{pointer-events:none}
@media(max-height:650px){.ih-rail{gap:12px}.ih-meta{bottom:48px}.ih-title{font-size:18px}.ih-rank{margin-bottom:6px}.ih-danmaku-toggle{bottom:88px}.ih-tag{padding-top:2px;padding-bottom:2px}}
@media(orientation:landscape){.ih-comments{left:auto;width:48%;top:var(--ih-viewport-top,0px);height:var(--ih-viewport,100dvh);border-radius:20px 0 0 20px}.ih-feed.comments-open .ih-slide.is-current .ih-media{top:54px;bottom:0;height:auto;right:48%}.ih-rail{gap:4px}.ih-reaction>img{width:26px;height:26px;padding:5px}.ih-reaction{min-height:48px}.ih-count{font-size:12px}.ih-meta{right:84px;max-width:55%}.ih-slide.is-landscape .ih-media{height:calc(100% - 80px);aspect-ratio:auto}.ih-danmaku{max-width:65%}}
@media(prefers-reduced-motion:reduce){.ih-reaction.is-bouncing>img,.ih-heart-burst{animation:none!important}.ih-media{transition:none}}
/* Safari collapses its browser chrome only for a real document pan. */
html.ios-home-active {height:auto!important;overflow-y:auto!important;overflow-x:clip!important;scroll-snap-type:y mandatory;scroll-behavior:auto;overscroll-behavior-y:auto}
html.ios-home-active body {height:auto!important;min-height:100%;overflow:visible!important;padding:0!important;overscroll-behavior-y:auto}
html.ios-home-active main {height:0!important;min-height:0!important;overflow:hidden!important;margin:0!important;padding:0!important}
html.ios-home-active .site-footer {display:none!important}
html.ios-home-active .ih-feed {position:absolute;top:0;height:auto;overflow:visible;scroll-snap-type:none;overscroll-behavior:auto;padding-bottom:var(--mobile-bottom-nav-height,76px)}
html.ios-home-active .ih-slide {height:var(--ih-height);scroll-snap-align:start;scroll-snap-stop:always}
html.ios-home-comments-open {overflow:hidden!important;scroll-snap-type:none}
html.ios-home-comments-open body {position:fixed;width:100%;overflow:hidden!important}
html.ios-home-comments-open .ih-feed {touch-action:none}
/* Safari paints scroll content beneath its status bar. Clip only that extension,
   retaining document scrolling and both cards during the native swipe. */
html.ios-home-active .ih-feed {clip-path:inset(var(--ih-document-y,0px) 0 0 0)}

.ih-slide:not(.has-frame) .ih-video{opacity:0}.ih-slide.has-frame .ih-video{opacity:1}
