:root {
	--bg: #ffffff;
	--text: #0f0f0f;
	--text2: #606060;
	--chip: #f2f2f2;
	--chip-hover: #e5e5e5;
	--line: #e5e5e5;
	--red: #ff0033;
	--top: 56px;
	--guide: 240px;
	--mini: 72px;
	--bottom: 0px;
	--safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: Roboto, Arial, sans-serif;
	font-size: 14px;
	-webkit-tap-highlight-color: transparent;
	overscroll-behavior-y: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
svg { fill: currentColor; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
	position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 30;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 0 16px; background: var(--bg);
	padding-top: env(safe-area-inset-top, 0px);
	height: calc(var(--top) + env(safe-area-inset-top, 0px));
}
.tb-start { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tb-end { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.icon-btn:hover { background: rgba(0,0,0,.08); }
.icon-btn svg { width: 24px; height: 24px; }
.logo { display: flex; align-items: center; gap: 3px; padding: 18px 14px 18px 8px; }
.logo-mark { width: 30px; height: 21px; }
.logo-text { font-weight: 700; font-size: 19px; letter-spacing: -1px; font-family: "Roboto", Arial, sans-serif; }
.search { display: flex; align-items: center; flex: 0 1 640px; margin: 0 auto; min-width: 0; }
.search-box { position: relative; flex: 1; display: flex; min-width: 0; }
.search input {
	width: 100%; height: 40px; border: 1px solid #ccc; border-right: 0;
	border-radius: 40px 0 0 40px; padding: 0 40px 0 16px; font-size: 16px; outline: none;
	font-family: inherit; background: #fff; -webkit-appearance: none; appearance: none;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { border-color: #1c62b9; box-shadow: inset 0 1px 2px rgba(0,0,0,.3); }
.search-clear { position: absolute; right: 4px; top: 4px; width: 32px; height: 32px; border-radius: 50%; display: none; place-items: center; }
.search-clear svg { width: 20px; height: 20px; }
.search.has-text .search-clear { display: grid; }
.search-btn { width: 64px; height: 40px; border: 1px solid #ccc; background: #f8f8f8; border-radius: 0 40px 40px 0; display: grid; place-items: center; }
.search-btn svg { width: 24px; height: 24px; }
.search-btn:hover { background: #f0f0f0; }
.search-back, .search-open { display: none; }
.install-btn {
	display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 10px;
	border: 1px solid var(--line); border-radius: 18px; font-weight: 500; color: #065fd4;
}
.install-btn svg { width: 22px; height: 22px; }
.install-btn:hover { background: #def1ff; border-color: transparent; }
.avatar {
	width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
	color: #fff; font-weight: 500; font-size: 16px; background: #7b1fa2; user-select: none;
}
.avatar.me { width: 32px; height: 32px; font-size: 14px; background: #ef6c00; }

/* ---------- side guide ---------- */
.guide {
	position: fixed; top: calc(var(--top) + env(safe-area-inset-top, 0px)); bottom: 0; left: 0; z-index: 20;
	width: var(--guide); padding: 12px; overflow-y: auto; background: var(--bg);
}
.guide a {
	display: flex; align-items: center; gap: 24px; height: 40px; padding: 0 12px; border-radius: 10px;
	white-space: nowrap; font-size: 14px;
}
.guide a svg { width: 24px; height: 24px; flex-shrink: 0; }
.guide a:hover { background: var(--chip); }
.guide a.active { background: var(--chip); font-weight: 500; }
.guide hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.guide-section h4 { margin: 4px 12px 8px; font-size: 16px; font-weight: 500; }
.scrim { display: none; }

main {
	padding-top: calc(var(--top) + env(safe-area-inset-top, 0px));
	margin-left: var(--guide);
	min-height: 100vh;
	outline: none;
}
body.guide-mini .guide { width: var(--mini); padding: 4px; }
body.guide-mini .guide a { flex-direction: column; gap: 6px; height: 74px; justify-content: center; padding: 0; font-size: 10px; }
body.guide-mini .guide .guide-full, body.guide-mini .guide hr { display: none; }
body.guide-mini main { margin-left: var(--mini); }

.bottomnav { display: none; }

/* watch page hides the guide (YouTube shows it as an overlay drawer there) */
body.page-watch .guide, body.page-shorts.guide-mini .guide { }
body.page-watch .guide { transform: translateX(-100%); transition: transform .2s; width: var(--guide); padding: 12px; box-shadow: none; }
body.page-watch.drawer-open .guide { transform: none; box-shadow: 0 0 24px rgba(0,0,0,.2); z-index: 40; }
body.page-watch.drawer-open .guide a { flex-direction: row; height: 40px; font-size: 14px; gap: 24px; padding: 0 12px; justify-content: flex-start; }
body.page-watch.drawer-open .guide .guide-full, body.page-watch.drawer-open .guide hr { display: block; }
body.page-watch.drawer-open .guide a.guide-full { display: flex; }
body.page-watch main { margin-left: 0; }
body.drawer-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35; }

/* ---------- chips ---------- */
.chips {
	position: sticky; top: calc(var(--top) + env(safe-area-inset-top, 0px)); z-index: 10; background: var(--bg);
	display: flex; gap: 12px; padding: 12px 24px; overflow-x: auto; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
	height: 32px; padding: 0 12px; border-radius: 8px; background: var(--chip);
	font-weight: 500; white-space: nowrap; flex-shrink: 0;
}
.chip:hover { background: var(--chip-hover); }
.chip.active { background: var(--text); color: #fff; }

/* ---------- home grid ---------- */
.home { padding: 0 16px 40px; }
.grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 40px 16px; padding: 12px 8px 0; }
.card { display: block; min-width: 0; }
.thumb { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #e8e8e8; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.card:hover .thumb img { transform: scale(1.03); }
.card-meta { display: flex; gap: 12px; padding-top: 12px; }
.card-meta .avatar { width: 36px; height: 36px; font-size: 15px; }
.card-text { min-width: 0; }
.card-title {
	margin: 0 0 4px; font-size: 16px; line-height: 22px; font-weight: 500;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-sub { color: var(--text2); font-size: 14px; line-height: 20px; }
.card-sub div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.shelf { grid-column: 1 / -1; padding: 8px 0 0; border-top: 4px solid transparent; }
.shelf-head { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 20px; font-weight: 700; }
.shelf-head svg { width: 28px; height: 28px; color: var(--red); }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 16px * (var(--scols, 5) - 1)) / var(--scols, 5)); gap: 16px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.shelf-row::-webkit-scrollbar { display: none; }
.scard { display: block; scroll-snap-align: start; min-width: 0; }
.scard .sthumb { aspect-ratio: 9/16; border-radius: 12px; overflow: hidden; background: #e8e8e8; }
.scard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scard h3 { margin: 10px 0 4px; font-size: 16px; line-height: 22px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scard p { margin: 0; color: var(--text2); font-size: 14px; }
.vshelf .shelf-row { grid-auto-columns: calc((100% - 16px * (var(--cols, 4) - 1)) / var(--cols, 4)); }

.empty { text-align: center; padding: 80px 24px; color: var(--text2); font-size: 16px; }
.empty .big { font-size: 56px; margin-bottom: 12px; }
.empty h2 { color: var(--text); font-size: 20px; font-weight: 500; margin: 0 0 8px; }

/* ---------- watch page ---------- */
.watch { display: flex; gap: 24px; padding: 24px 24px 40px; max-width: 1754px; margin: 0 auto; }
.watch-main { flex: 1; min-width: 0; }
.watch-side { width: 402px; flex-shrink: 0; }
.watch h1 { font-size: 20px; line-height: 28px; font-weight: 700; margin: 12px 0 8px; word-break: break-word; }
.owner { display: flex; align-items: center; gap: 12px; }
.owner .avatar { width: 40px; height: 40px; }
.owner-name { font-weight: 500; font-size: 16px; }
.owner-sub { color: var(--text2); font-size: 12px; }
.owner .spacer { flex: 1; }
.pill { height: 36px; padding: 0 16px; border-radius: 18px; background: var(--chip); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.pill:hover { background: var(--chip-hover); }
.pill svg { width: 22px; height: 22px; }
.pill.on { background: var(--text); color: #fff; }
.desc { background: var(--chip); border-radius: 12px; padding: 12px; margin-top: 12px; font-size: 14px; line-height: 20px; }
.desc b { font-weight: 500; }
.next-item { display: flex; gap: 8px; margin-bottom: 8px; border-radius: 8px; }
.next-item .thumb { width: 168px; flex-shrink: 0; border-radius: 8px; }
.next-item h3 { font-size: 14px; line-height: 20px; margin: 0 0 4px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.next-item p { margin: 0; color: var(--text2); font-size: 12px; line-height: 18px; }
.watch-side .chips { position: static; padding: 0 0 12px; }

/* ---------- player ---------- */
.player { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; user-select: none; -webkit-user-select: none; }
.player .yt, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Make the embed taller than the box: the video stays the same size, YouTube's title bar and
   "More videos" strip land in the hidden black bands above and below. */
.player iframe, .player iframe.yt { top: -80px; height: calc(100% + 160px); }
.player .shield { position: absolute; inset: 0; z-index: 2; cursor: pointer; }
.player.is-short .shield { touch-action: pan-y; cursor: grab; }
.player .poster { position: absolute; inset: 0; z-index: 3; background: #000 center/cover no-repeat; transition: opacity .25s; pointer-events: none; }
.player.playing .poster, .player.buffering .poster { opacity: 0; }
.player .bigplay {
	position: absolute; left: 50%; top: 50%; z-index: 4; width: 76px; height: 54px; margin: -27px 0 0 -38px;
	border-radius: 16px; background: rgba(23,23,23,.8); display: grid; place-items: center; pointer-events: none; transition: background .15s;
}
.player:hover .bigplay { background: var(--red); }
.player .bigplay svg { width: 36px; height: 36px; fill: #fff; }
.player.playing .bigplay, .player.buffering .bigplay, .player.ended .bigplay { display: none; }
.player .spinner { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px; z-index: 4; border: 4px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: none; pointer-events: none; }
.player.buffering .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.player .controls {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 0 12px;
	background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; transition: opacity .25s;
}
.player.idle.playing .controls { opacity: 0; pointer-events: none; }
.player.idle.playing .shield { cursor: none; }
.progress { position: relative; height: 16px; cursor: pointer; display: flex; align-items: center; touch-action: none; }
.progress .track { position: absolute; left: 0; right: 0; height: 3px; background: rgba(255,255,255,.3); transition: height .1s; }
.progress:hover .track { height: 5px; }
.progress .loaded { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,.4); }
.progress .played { position: absolute; left: 0; top: 0; bottom: 0; background: var(--red); }
.progress .knob { position: absolute; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: var(--red); transform: scale(0); transition: transform .1s; }
.progress:hover .knob, .progress.drag .knob { transform: scale(1); }
.ctrl-row { display: flex; align-items: center; height: 48px; gap: 4px; }
.ctrl-row button { width: 48px; height: 48px; display: grid; place-items: center; opacity: .95; }
.ctrl-row button svg { width: 30px; height: 30px; fill: #fff; }
.ctrl-row .time { font-size: 13px; padding: 0 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ctrl-row .grow { flex: 1; }
.player .endcard {
	position: absolute; inset: 0; z-index: 6; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
	background: rgba(0,0,0,.72); color: #fff; text-align: center; padding: 16px;
}
.player.ended .endcard { display: flex; }
.endcard .next-up { display: flex; gap: 12px; align-items: center; max-width: 520px; text-align: left; }
.endcard .next-up img { width: 160px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; }
.endcard .label { font-size: 13px; opacity: .8; }
.endcard .t { font-size: 16px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.endcard .btns { display: flex; gap: 12px; }
.endcard button { height: 40px; padding: 0 18px; border-radius: 20px; background: rgba(255,255,255,.18); color: #fff; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.endcard button svg { width: 22px; height: 22px; fill: #fff; }
.endcard button.primary { background: #fff; color: #0f0f0f; }
.endcard button.primary svg { fill: #0f0f0f; }
.player:fullscreen { border-radius: 0; aspect-ratio: auto; }
.player.fake-fs { position: fixed; inset: 0; z-index: 1000; border-radius: 0; aspect-ratio: auto; }

.player .unmute { position: absolute; left: 12px; top: 12px; z-index: 7; display: flex; gap: 6px; align-items: center; background: rgba(0,0,0,.72); color: #fff; padding: 8px 14px 8px 10px; border-radius: 20px; font-weight: 500; font-size: 14px; }
.player .unmute svg { width: 22px; height: 22px; fill: #fff; }
.short-holder { position: absolute; inset: 0; }

/* ---------- shorts ---------- */
body.page-shorts { background: var(--bg); }
.shorts {
	height: calc(100vh - var(--top) - env(safe-area-inset-top, 0px));
	height: calc(100dvh - var(--top) - env(safe-area-inset-top, 0px));
	overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; position: relative;
}
.shorts::-webkit-scrollbar { display: none; }
.short-slide { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px 0; }
.short-frame { position: relative; height: 100%; aspect-ratio: 9/16; max-width: 100%; border-radius: 12px; overflow: hidden; background: #000; }
.short-frame .player { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.short-frame .player .poster { background-size: cover; }
.short-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 48px 16px 18px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); pointer-events: none; }
.short-info .ch { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-bottom: 10px; }
.short-info .ch .avatar { width: 32px; height: 32px; font-size: 14px; }
.short-info .t { font-size: 15px; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.short-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 6; background: rgba(255,255,255,.3); pointer-events: none; }
.short-bar i { display: block; height: 100%; width: 0; background: var(--red); }
.short-actions { align-self: flex-end; display: flex; flex-direction: column; gap: 16px; align-items: center; padding-bottom: 8px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; }
.act .circ { width: 48px; height: 48px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; }
.act .circ:hover { background: var(--chip-hover); }
.act .circ svg { width: 24px; height: 24px; }
.act.on .circ { background: var(--text); color: #fff; }
.short-nav { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 16px; z-index: 15; }
.short-nav button { width: 56px; height: 56px; border-radius: 50%; background: var(--chip); display: grid; place-items: center; }
.short-nav button:hover { background: var(--chip-hover); }
.short-nav button svg { width: 28px; height: 28px; }
.short-nav button:disabled { opacity: .3; cursor: default; }

/* ---------- search & you ---------- */
.results { max-width: 1096px; margin: 0 auto; padding: 16px 24px 40px; }
.result { display: flex; gap: 16px; margin-bottom: 16px; }
.result .thumb { width: 360px; flex-shrink: 0; }
.result h3 { margin: 0 0 6px; font-size: 18px; line-height: 26px; font-weight: 400; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result .meta { color: var(--text2); font-size: 12px; display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.result .meta .avatar { width: 24px; height: 24px; font-size: 11px; }
.result .short-tag { display: inline-flex; align-items: center; gap: 2px; color: var(--red); font-weight: 500; font-size: 12px; }
.result .short-tag svg { width: 16px; height: 16px; }
.result.is-short .thumb { width: 180px; aspect-ratio: 9/16; margin: 0 90px; }
.page-title { font-size: 24px; font-weight: 700; margin: 16px 0 8px; display: flex; align-items: center; gap: 16px; }
.page-title .avatar { width: 72px; height: 72px; font-size: 32px; }
.you { padding: 8px 24px 40px; max-width: 1400px; }
.you section { margin-top: 24px; }
.you h2 { font-size: 20px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.you h2 svg { width: 24px; height: 24px; }
.you .muted { color: var(--text2); }

/* ---------- install sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; }
.sheet-card { background: #fff; border-radius: 16px 16px 0 0; padding: 20px 24px calc(20px + var(--safe-b)); max-width: 480px; width: 100%; }
.sheet-card h3 { margin: 0 0 8px; font-size: 18px; }
.sheet-card p { color: #333; line-height: 1.5; font-size: 15px; }
.inline-ic { width: 18px; height: 18px; vertical-align: -3px; fill: #007aff; }
.btn-dark { height: 40px; padding: 0 24px; border-radius: 20px; background: var(--text); color: #fff; font-weight: 500; width: 100%; }

/* ---------- responsive ---------- */
@media (max-width: 1311px) {
	.watch-side { width: 360px; }
}
@media (max-width: 1015px) {
	.watch { flex-direction: column; padding: 0 0 40px; }
	.watch .player { border-radius: 0; }
	.watch-info { padding: 0 12px; }
	.watch-side { width: auto; padding: 12px; }
	body:not(.page-watch) .player { border-radius: 0; }
}
@media (max-width: 791px) {
	:root { --top: 48px; --bottom: 48px; }
	.topbar { padding: 0 4px 0 0; gap: 4px; }
	#menuBtn { display: none; }
	.logo { padding: 12px 8px 12px 12px; }
	.logo-text { font-size: 18px; }
	.search { display: none; }
	.search-open { display: grid; }
	.install-btn span { display: none; }
	.install-btn { border: 0; padding: 0; width: 40px; justify-content: center; }
	body.searching .tb-start, body.searching .tb-end { display: none; }
	body.searching .search { display: flex; flex: 1; gap: 4px; padding-right: 8px; }
	body.searching .search-back { display: grid; }
	.search-btn { width: 48px; }
	.guide { display: none; }
	main, body.guide-mini main { margin-left: 0; padding-bottom: calc(var(--bottom) + var(--safe-b)); }
	.bottomnav {
		display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
		height: calc(var(--bottom) + var(--safe-b)); padding-bottom: var(--safe-b);
		background: var(--bg); border-top: 1px solid var(--line);
	}
	.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; }
	.bottomnav a svg { width: 24px; height: 24px; }
	.bottomnav a.active svg { color: var(--text); }
	.bottomnav a:not(.active) { color: #333; }
	.home { padding: 0 0 24px; }
	.chips { padding: 8px 12px; gap: 8px; }
	.grid { padding: 0; gap: 24px 16px; }
	.grid .card .thumb { border-radius: 0; }
	.card-meta { padding: 12px 12px 0; }
	.shelf { padding: 0 12px; }
	.vshelf .shelf-row, .shelf-row { grid-auto-columns: 42%; gap: 8px; }
	.vshelf .shelf-row { grid-auto-columns: 75%; }
	.shorts { height: calc(100dvh - var(--top) - var(--bottom) - var(--safe-b) - env(safe-area-inset-top, 0px)); }
	body.page-shorts .topbar { background: #000; color: #fff; }
	body.page-shorts .topbar .icon-btn:hover { background: rgba(255,255,255,.1); }
	body.page-shorts .bottomnav { background: #000; color: #fff; border-color: #222; }
	body.page-shorts .bottomnav a:not(.active) { color: #aaa; }
	body.page-shorts .bottomnav a.active svg { color: #fff; }
	body.page-shorts { background: #000; }
	.short-slide { padding: 0; position: relative; }
	.short-frame { height: 100%; width: 100%; aspect-ratio: auto; border-radius: 0; }
	.short-actions { position: absolute; right: 8px; bottom: 72px; z-index: 7; color: #fff; }
	.act .circ { background: rgba(0,0,0,.35); }
	.act.on .circ { background: #fff; color: #0f0f0f; }
	.short-info { padding-right: 72px; }
	.short-nav { display: none; }
	.results { padding: 0 0 24px; }
	.result { flex-direction: column; gap: 0; margin-bottom: 24px; }
	.result .thumb, .result.is-short .thumb { width: 100%; border-radius: 0; margin: 0; }
	.result.is-short .thumb { aspect-ratio: 16/9; }
	.result-text { padding: 12px; }
	.result h3 { font-size: 16px; line-height: 22px; font-weight: 500; }
	.next-item .thumb { width: 160px; }
	.you { padding: 0 12px 24px; }
	.endcard .next-up img { width: 110px; }
	.ctrl-row button { width: 40px; }
	.ctrl-row button svg { width: 26px; height: 26px; }
}
@media (display-mode: standalone) { .install-btn { display: none !important; } }

/* ---------- dark theme (follows the device, like the YouTube app) ---------- */
@media (prefers-color-scheme: dark) {
	:root { --bg: #0f0f0f; --text: #f1f1f1; --text2: #aaaaaa; --chip: #272727; --chip-hover: #3f3f3f; --line: #3f3f3f; }
	.icon-btn:hover { background: rgba(255,255,255,.1); }
	.search input { background: #121212; border-color: #303030; color: var(--text); }
	.search input:focus { border-color: #1c62b9; }
	.search-btn { background: #222; border-color: #303030; }
	.search-btn:hover { background: #2a2a2a; }
	.chip.active { background: #f1f1f1; color: #0f0f0f; }
	.pill.on { background: #f1f1f1; color: #0f0f0f; }
	.act.on .circ { background: #f1f1f1; color: #0f0f0f; }
	.install-btn { color: #3ea6ff; }
	.install-btn:hover { background: #263850; }
	.thumb, .scard .sthumb { background: #272727; }
	.sheet-card { background: #212121; }
	.sheet-card p { color: #ddd; }
	.btn-dark { background: #f1f1f1; color: #0f0f0f; }
	.bottomnav a:not(.active) { color: #ccc; }
}

/* ---------- Font Awesome icon sizes ---------- */
i.fa-solid { line-height: 1; }
.icon-btn i { font-size: 20px; }
.search-clear i, .search-btn i { font-size: 18px; }
.install-btn i { font-size: 17px; }
.guide a i { font-size: 20px; width: 24px; text-align: center; flex-shrink: 0; }
.bottomnav a i { font-size: 20px; height: 24px; display: grid; place-items: center; }
.shelf-head i { font-size: 24px; color: var(--red); }
.pill i { font-size: 18px; }
.player .bigplay i { font-size: 28px; color: #fff; margin-left: 4px; }
.ctrl-row button i { font-size: 22px; color: #fff; }
.endcard button i { font-size: 16px; }
.endcard button.primary i { color: #0f0f0f; }
.player .unmute i { font-size: 18px; }
.act .circ i { font-size: 20px; }
.short-nav button i { font-size: 22px; }
.result .short-tag i { font-size: 13px; margin-right: 3px; }
.you h2 i { font-size: 20px; }
.inline-ic { color: #007aff; }
.bottomnav a.active i { color: var(--text); }
